Read the docs
TI-2024-07207 Aliases CVE-2024-7774GHSA-hc5w-c9f8-9cc4

Path Traversal in langchain-ai/langchainjs

Priority HIGH 72CWE-29Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
High · High · None
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub.

Summary

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00557 46th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed langchain-ai/langchainjs (langchain-ai): 0.2.19langchain (npm): 0.2.19

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
langchain-ailangchain-ai/langchainjsbefore 0.2.190.2.19Patch availableCNA
—langchain (npm)before 0.2.190.2.19Patch availableGHSA-hc5w-c9f8-9cc4
  • langchain-ai/langchainjs Vendorlangchain-ai Affected before 0.2.19 Fixed in 0.2.19 Patch available CNA
  • langchain (npm) Vendor— Affected before 0.2.19 Fixed in 0.2.19 Patch available GHSA-hc5w-c9f8-9cc4

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:langchain:langchain.js:0.2.5:*:*:*:*:*:*:*0.2.5Vulnerablelangchain-ai
  • cpe:2.3:a:langchain:langchain.js:0.2.5:*:*:*:*:*:*:* Versions 0.2.5 Vulnerable ·langchain-ai

Remediation

  • Fix · CNA langchain-ai/langchainjs (langchain-ai) Fixed in 0.2.19
  • Fix · GHSA-hc5w-c9f8-9cc4 langchain (npm) Fixed in 0.2.19 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2024-7774
  2. 2026-10-03 Alias added: GHSA-hc5w-c9f8-9cc4

References

  • TI-2025-42158 LangChain serialization injection vulnerability enables secret extraction CVSS 3.1CRITICAL 9.1

Sources