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

> CVE-2024-7774: Path Traversal in langchain-ai/langchainjs. CVSS 6.5 (CVSS 3.1).

Canonical: https://rewindex.com/cve/CVE-2024-7774
Last updated: 2026-06-17T08:20:53Z

- Published: 2024-10-29 12:49 UTC · Updated: 2026-06-17 08:20 UTC · Assigner: @huntr\_ai
- CVSS: 6.5 (CVSS 3.1) · Severity: Medium · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
- EPSS: 0.56%, 46th percentile (scored 2026-10-25)
- CISA KEV: no
- CWE: CWE-29

## 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.

## Affected vendors and products

- langchain-ai: langchain-ai/langchainjs
- langchain-ai: langchain-ai\\/langchainjs

## Tracked companies

- [LangChain (LangSmith)](https://rewindex.com/company/langchain-langsmith.md)

## References

- [CVE record on cve.org](https://www.cve.org/CVERecord?id=CVE-2024-7774)
- [NVD entry](https://nvd.nist.gov/vuln/detail/CVE-2024-7774)
- [https://github.com/langchain-ai/langchainjs/commit/a0fad77d6b569e5872bd4a9d33be0c0785e538a9](https://github.com/langchain-ai/langchainjs/commit/a0fad77d6b569e5872bd4a9d33be0c0785e538a9)
- [https://huntr.com/bounties/8fe40685-b714-4191-af7a-3de5e5628cee](https://huntr.com/bounties/8fe40685-b714-4191-af7a-3de5e5628cee)

---

_Sources: CVE records from the CVE Program (cve.org). CVE® is a registered trademark of The MITRE Corporation. (https://www.cve.org/) This product uses data from the NVD API but is not endorsed or certified by the NVD. (https://nvd.nist.gov/) Known Exploited Vulnerabilities catalog from CISA. (https://www.cisa.gov/known-exploited-vulnerabilities-catalog) EPSS scores from FIRST (Exploit Prediction Scoring System). (https://www.first.org/epss/)_


---
Canonical: https://rewindex.com/cve/CVE-2024-7774 · Markdown: https://rewindex.com/cve/CVE-2024-7774.md · JSON: https://rewindex.com/api/v1/cves/CVE-2024-7774 · Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) · Generated 2026-10-26T03:09:03.499Z
