criticalCVSS 9.1NVD status: Analyzed

CVE-2024-7774

LangChain: A path traversal vulnerability exists in the `getFullPath` method of langchain-ai/langchainjs version 0.2.5.

ComponentLangChain
Severitycritical (CVSS 9.1)
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Published (NVD)2024-10-29
Last modified2026-06-17
Affected versions
langchain.js = 0.2.5
Fixed insee the vendor advisory
WeaknessCWE-29CWE-22
CISA KEVnot listed

NVD description

A path traversal vulnerability exists in the `getFullPath` method of langchain-ai/langchainjs version 0.2.5. This vulnerability allows attackers to save files anywhere in the filesystem, overwrite existing text files, read `.txt` files, and delete files. The vulnerability is exploited through the `setFileContent`, `getParsedFile`, and `mdelete` methods, which do not properly sanitize user input.

Does CVE-2024-7774 hit the version you run?Paste your docker-compose.yml, requirements.txt or package.json. The scanner checks your pinned versions against this CVE and every other one we track for LangChain.
Check my stack

What to do

  • NVD lists no fixed version yet: follow the vendor advisory below and keep LangChain off the public internet until a fix ships.
  • Do not expose the component's API or UI to the internet without authentication in front of it.

Sources

Other LangChain CVEs

All LangChain CVEs