CVE-2024-7774 json
Path Traversal in langchain-ai/langchainjs
published 2024-10-29 2 y ago modified 2026-08-07 3 mo ago also GHSA-hc5w-c9f8-9cc4 , EUVD-2024-0091
- cvss
- 6.5
- version 3.0, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.6%
- EPSS 0.6% chance of exploitation in 30 days, percentile 46%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm langchain 0.2.19
- langchain-ai langchain-ai/langchainjs 0.2.19
- langchain-ai langchain-ai\/langchainjs 0.2.19
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.56% chance of exploitation in the next 30 days, higher than 46% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- huntr.com https://huntr.com/bounties/8fe40685-b714-4191-af7a-3de5e5628cee referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.0 | 6.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
| NVD | 3.1 | 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| GitHub | 3.0 | 6.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | langchain | <0.2.19 |
0.2.19 |
Affected products
- langchain-ai langchain-ai/langchainjs
- langchain-ai langchain-ai\/langchainjs
Classification
References
-
github.com
/langchain-ai/langchainjs/commit/a0fad77d6b569e5872bd4a9d33be0c0785e538a9
web, patch
-
huntr.com
/bounties/8fe40685-b714-4191-af7a-3de5e5628cee
web, exploit, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2024-7774
advisory
-
github.com
/langchain-ai/langchainjs
package
-
github.com
/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2024-111.yaml
web
Sources
- CVE List CVE-2024-7774
- GitHub Advisory GHSA-hc5w-c9f8-9cc4
- NVD CVE-2024-7774
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.