{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-7774","id":"CVE-2024-7774","title":"Path Traversal in langchain-ai/langchainjs","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.","descriptionLong":"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.","published":"2024-10-29T12:49:21.165Z","updated":"2026-10-28T02:30:32.512237129Z","reserved":"2024-08-13T21:13:38.960Z","status":"Analyzed","rejected":false,"assigner":"@huntr_ai","metric":{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","rating":"critical","source":"NVD"},"metrics":[{"version":"4.0","score":null,"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","rating":"medium","source":"GitHub"},{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","rating":"critical","source":"NVD"},{"version":"3.0","score":6.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","rating":"medium","source":"@huntr_ai"},{"version":"3.0","score":6.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","rating":"medium","source":"huntr.dev"},{"version":"3.0","score":6.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","rating":"medium","source":"OSV"},{"version":"3.0","score":6.5,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","rating":"medium","source":"GitHub"}],"rating":"critical","products":["langchain-ai/langchainjs"],"affectedProducts":[{"vendor":"langchain-ai","product":"langchain-ai/langchainjs","defaultStatus":null,"versions":[{"version":"unspecified","lessThan":"0.2.19","status":"affected","versionType":"custom"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"langchain","purl":"pkg:npm/langchain","ranges":["<0.2.19"],"fixed":["0.2.19"],"advisory":"GHSA-hc5w-c9f8-9cc4"}],"cwes":["CWE-29","CWE-22"],"aliases":["GHSA-hc5w-c9f8-9cc4"],"references":[{"url":"https://huntr.com/bounties/8fe40685-b714-4191-af7a-3de5e5628cee","tags":["Exploit","Third Party Advisory","web"]},{"url":"https://github.com/langchain-ai/langchainjs/commit/a0fad77d6b569e5872bd4a9d33be0c0785e538a9","tags":["Patch","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/7xxx/CVE-2024-7774.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-7774","tags":["advisory"]},{"url":"https://github.com/langchain-ai/langchainjs","tags":["package"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2024-111.yaml","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial"},"epss":0.00557,"epssPercentile":0.47135,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-7774","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-7774","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-7774","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-hc5w-c9f8-9cc4","ok":true,"note":"GHSA-hc5w-c9f8-9cc4"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-7774","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}