Documented Incident · INC-2024-7774 · Elevated severity
LangChain.js Path Traversal in Local Artifact Storage Helper
CVE-2024-7774 identified a path traversal vulnerability in LangChain.js within its local artifact file-storage path helper (`getFullPath`). The helper joined caller- or model-supplied relative file names with a base directory without verifying that the resolved canonical path remained strictly inside the sandbox boundary. Crafted traversal filenames enabled arbitrary writes or reads outside the intended directory on Node.js servers running agent file tools. Maintainers patched the path helper to enforce strict boundary containment checks before filesystem operations.
Incident dossier metadata
- Case ID
INC-2024-7774- Classification
- Incident
- Date
- Severity
- Elevated
- Sector
- Software Development & AI Tooling
- Attack vector
- Supply Chain
- System type
- TypeScript/JavaScript LLM Agent Toolchains
- CVE / reference
CVE-2024-7774- Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2024-7774
Defensive takeaway
Resolve paths with path.resolve() and assert strict prefix containment against the sandbox root plus trailing path separator before any filesystem write.
Mapped AI security techniques
- Supply Chain Compromise: Software AML.T0010.001
- Data from Local System AML.T0037
- AI Agent Tool Invocation AML.T0053
- Modify AI Agent Configuration AML.T0081
Mapped defensive controls
- Vulnerability Scanning AML.M0016
- Enforce Access Controls for AI Agent Tools AML.M0028
- Input and Output Validation for AI Agent Components AML.M0033
Source citation records
- NVD Record CVE-2024-7774: LangChain.js Local Path Traversal · NIST National Vulnerability Database (NVD) ·