GHSA-jjhp-8crj-mppq: Path Traversal

Published Sep 22, 2026
·
Updated

Summary

The vaultbatch MCP tool (and the equivalent POST /batch-to-vault HTTP endpoint) accepted a caller-supplied vaultdir path that was passed directly to path.resolve() + fs.mkdir() with no containment check. A caller — or a prompt-injected LLM driving the MCP — could therefore create directories and write .md / .json answer files anywhere the server process can write.

The slugprefix parameter had a parallel, smaller traversal vector: it was concatenated into the filename without sanitization, so a prefix containing / or .. could escape the resolved vault directory through the filename component.

Impact

File write (markdown + JSON sidecars) to any location writable by the server process. The written files are inert content (no code execution by themselves), but in a multi-user context — or when the MCP server is driven by an LLM that has read untrusted content (prompt injection) — this allows an attacker to plant files in sensitive locations (autostart folders, shell startup files, etc.) for downstream exploitation.

The vulnerability exists from v1.6.0 (when the HTTP /batch-to-vault endpoint was introduced) and v1.7.0 (when the same logic was exposed as the batchtovault MCP tool) through v2.0.2.

Patch

Fixed in v2.0.3:

- Opt-in containment via NOTEBOOKLMVAULTROOT env var. When set, vaultdir is resolved relative to that root and realpath-based containment is enforced. Absolute paths or .. segments outside the root are rejected with a clear error. - slugprefix is always sanitized. Path separators (/, \), .. sequences and NUL bytes are stripped, length capped at 64 characters. This applies regardless of whether NOTEBOOKLMVAULTROOT is set. - 15 unit tests in src/tests/vault-writer.test.ts cover the escape vectors (absolute paths, sibling-prefix attacks, .. traversal, NUL/separator stripping).

Workarounds for users who cannot upgrade

- Run the MCP server under a dedicated unprivileged user with write access only to the intended vault directory. - Do not expose the HTTP /batch-to-vault endpoint beyond localhost. - If using an LLM that ingests untrusted content, validate any vaultdir arguments before forwarding them to the MCP.

Configuration requirement after upgrade (important)

v2.0.3 preserves the legacy unrestricted behaviour when NOTEBOOKLMVAULTROOT is unset, to keep existing single-user local setups working. To enable containment, set NOTEBOOKLMVAULTROOT in the server environment to a directory that should bound all vault writes.

Credit

Reported by @mcfly-zzh — thanks for the careful diagnosis and follow-up verification.

Affected Software

1 affected componentFixes available
npm/@roomi-fields/notebooklm-mcp>=1.6.0<2.0.3
2.0.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/@roomi-fields/notebooklm-mcp to a version that resolves this vulnerability.

    Fixed in 2.0.3
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in v2.0.3
  3. Configuration

    Set NOTEBOOKLM_VAULT_ROOT in the server environment to a directory that should contain all vault writes; containment is enforced when this variable is set.

    MCP server NOTEBOOKLM_VAULT_ROOT = A directory that should bound all vault writes
  4. Compensating control

    Do not expose the HTTP /batch-to-vault endpoint beyond localhost.

  5. Compensating control

    Run the MCP server under a dedicated unprivileged user with write access only to the intended vault directory.

  6. Compensating control

    When using an LLM that ingests untrusted content, validate vault_dir arguments before forwarding them to the MCP.

Event History

Sep 22, 2026
Advisory Published
via GitHub·02:43 PM
Data Sourced
via GitHub·02:43 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

Which package versions are affected or fixed?

The provided data does not identify any affected versions or a fixed version for npm/@roomi-fields/notebooklm-mcp.

2

Are exploitation prerequisites, default exposure, or mitigations documented?

The provided data classifies the issue as path traversal but does not state exploitation prerequisites, whether default configurations are affected, or any temporary mitigation.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203