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

Inspect INC-2024-7774 in Interactive Incidents & Cases Hub

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

Mapped defensive controls

Source citation records