{"id":"GHSA-hc5w-c9f8-9cc4","revision":"3be10219bd194f399ba97a886aac7d0e","records":[{"revision":"3be10219bd194f399ba97a886aac7d0e","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-hc5w-c9f8-9cc4","aliases":["CVE-2024-7774"],"title":"Langchain Path Traversal vulnerability","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.","state":0,"publishedAt":"2024-10-29T15:32:05+00:00","modifiedAt":"2026-08-07T08:12:27.3589698+00:00","affected":[{"ecosystem":"npm","name":"langchain","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.2.19"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":null,"severity":null},{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://nvd.nist.gov/vuln/detail/CVE-2024-7774","https://github.com/langchain-ai/langchainjs/commit/a0fad77d6b569e5872bd4a9d33be0c0785e538a9","https://github.com/langchain-ai/langchainjs","https://github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2024-111.yaml","https://huntr.com/bounties/8fe40685-b714-4191-af7a-3de5e5628cee"],"sourceUrl":"https://github.com/advisories/GHSA-hc5w-c9f8-9cc4","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-hc5w-c9f8-9cc4","identifiers":["GHSA-hc5w-c9f8-9cc4","CVE-2024-7774"]},"retained":false,"historicalAffected":[]}],"coverage":[]}