# CVE-2024-7774: Path Traversal in langchain-ai/langchainjs

- Priority: **Routine**
- Reason: Not severe (CVSS 6.5, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-10-29 · Modified: 2024-10-29
- Aliases: GHSA-hc5w-c9f8-9cc4
- Record: https://cvemate.com/vulnerability/CVE-2024-7774 · JSON: https://cvemate.com/vulnerability/CVE-2024-7774/json

## Description

```text
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.
```

## Signals

- CVSS: 9.1 critical (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- EPSS: 0.557%, percentile 47.863%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (reference)

## Affected

- langchain-ai langchain-ai/langchainjs: ≥ unspecified, \< 0.2.19
- langchain langchain.js: 0.2.5
- Npm langchain (Npm): \< 0.2.19

## References

- <https://huntr.com/bounties/8fe40685-b714-4191-af7a-3de5e5628cee>
- <https://github.com/langchain-ai/langchainjs/commit/a0fad77d6b569e5872bd4a9d33be0c0785e538a9>
- <https://nvd.nist.gov/vuln/detail/CVE-2024-7774>
- <https://github.com/langchain-ai/langchainjs>
- <https://github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2024-111.yaml>

---

Data as of 2026-12-05T13:26:49.480Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
