AI security news · 3 min read

An AI document reader could reach files outside its folder.

AWS disclosed a path traversal in awslabs.document-loader-mcp-server, the MCP server that lets AI assistants read PDF, Office and image files. In some setups its folder restriction was not enforced.

An AI document reader could reach files outside its folder.: HanulSec guide
Key points
  • CVE-2026-130901 affects awslabs.document-loader-mcp-server 1.0.10 up to, not including, 1.0.21.
  • When DOCUMENT_BASE_DIR was unset and CI or test variables were present, the default folder restriction was skipped.
  • That could let the assistant read supported files elsewhere on disk, and in 1.0.12 to 1.0.20 write PNG slide images elsewhere.
  • Fixed in 1.0.21. AWS thanked Rishaank Gupta for coordinated disclosure.
An AI document reader could reach files outside its folder.: HanulSec AI Security Brief
AWS Document Loader MCP · CVE-2026-130901 · the one-page brief we shared on LinkedIn.

What happened

AWS Security Bulletin 2026-195, published on 20 November 2026, describes CVE-2026-130901 in the Document Loader MCP Server, an open-source tool that lets AI assistants parse PDF, Office and image files on the local file system. When DOCUMENT_BASE_DIR was not set and variables such as CI, GITHUB_ACTIONS or PYTEST_CURRENT_TEST were present, the default base-directory restriction was not applied. AWS thanked Rishaank Gupta for collaborating through coordinated disclosure.

Who is affected

  • Users of awslabs.document-loader-mcp-server 1.0.10 to 1.0.20
  • AI agents that run inside CI pipelines or test environments
  • Forks and derivative code based on the affected versions

Why it matters

AI agents are moving into build pipelines, where secrets, keys and source code sit on disk. A document tool that quietly loses its folder limit there can hand those files to the model, and from the model to anyone who can steer it with prompt injection.

What to do now

  • Update awslabs.document-loader-mcp-server to 1.0.21.
  • Set DOCUMENT_BASE_DIR to the folder that holds your documents. Never set it to /.
  • Patch any forks or copies of the code too.
  • Keep secrets out of folders that AI tools can read, especially in CI.

How HanulSec helps

  • We map which files and folders each AI tool can really reach in every environment, including CI.
  • We test folder limits with path tricks and hostile documents.
  • We check that secrets in pipelines stay out of AI tools’ reach.
Want us to test yours?

Tell us what you run and we will send a fixed-price proposal within one business day. Request a quote.

Questions

Quick answers.

Am I affected if I set DOCUMENT_BASE_DIR?
The bulletin says the problem occurs when DOCUMENT_BASE_DIR is not set or is empty. Setting it to your documents folder is the recommended workaround, but updating to 1.0.21 is still the fix.
Why do CI variables matter?
The server relaxed its folder restriction when it detected a test or CI environment. Agents increasingly run in pipelines, so test-only shortcuts can reach real systems.
Request a quote

Scope it in two minutes.

Tell us what you need protected. A security engineer, not a salesperson, replies with a fixed-price proposal.

  • Reply within one business day
  • Free 30-minute scoping call
  • Mutual NDA before any detail is shared
  • Fixed price, free retest of fixed findings