What happened
The document-loader MCP server does not properly limit paths to the configured base directory when DOCUMENT_BASE_DIR is empty and CI/GitHub Actions/Pytest env vars are present, allowing crafted document content to read files outside the base directory and write PNG slide images outside it.
Why it matters
A document-processing MCP server that reads artifacts for an LLM can be steered by crafted document content into reading arbitrary files (and writing outside the directory), leaking local files into an agent's context.
Attack vector
CWE-22/CWE-489 path traversal in the MCP server's file-access checks, triggered by crafted document content processed by an MCP client when no base dir is configured; reads outside the base dir and writes PNG slide outputs outside it. CVSS 3.1 5.3 (AV:L/AC:H/PR:N/UI:R), CVSS 4.0 5.8.
Affected systems
awslabs.document-loader-mcp-server 1.0.10–1.0.20 (fixed in 1.0.21)
Mitigation
Upgrade to awslabs.document-loader-mcp-server 1.0.21 or later; if you cannot upgrade, set DOCUMENT_BASE_DIR to the directory holding your documents (not /).