{"schemaVersion":3,"id":"PYSEC-2024-111","aliases":[],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2024-10-29T13:15:00.000Z","modified":"2025-10-09T08:27:22.374Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":9.1,"severity":"critical","version":"3.1","versionLabel":"v3.1","source":"OSV · Pypi","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","computed":true,"selection":"version-preference"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"OSV · Pypi","score":9.1,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","exploitability":10,"impact":8.7,"computed":true}]},"epss":{"probability":null,"percentile":null,"severity":"unknown","asOf":null,"change":{"pp":null,"baselineDate":null,"baselineScore":null},"history":[],"last30":[]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[],"affected":[{"vendor":"PyPI","product":"langchain","name":"langchain","label":"langchain","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/langchain","purlType":"pypi","versions":[{"text":"< a0fad77d6b569e5872bd4a9d33be0c0785e538a9","noFixRecorded":false,"fixedIn":null},{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"< a0fad77d6b569e5872bd4a9d33be0c0785e538a9 | All versions (No fix recorded)","eol":null,"hubHref":null}],"affectedCount":1,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://huntr.com/bounties/8fe40685-b714-4191-af7a-3de5e5628cee","label":"huntr.com/bounties/8fe40685-b714-4191-af7a-3de5e5628cee","hostname":"huntr.com","tags":["WEB"]},{"url":"https://github.com/langchain-ai/langchainjs/commit/a0fad77d6b569e5872bd4a9d33be0c0785e538a9","label":"github.com/langchain-ai/langchainjs/commit/a0fad77d6b569e5872bd4a9d33be0c0785e538a9","hostname":"github.com","tags":["FIX"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2024-10-29T13:15:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-10-09T08:27:22.374Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":70,"level":"high","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T13:41:34.837Z","stale":false,"partial":false}}