Live threats

All CVEs / Langchain

CVE-2024-7774Langchain.js

Critical 9.1 No auth needed

Priority
70
CVSS 3.1
9.1
EPSS
0.7%
probability of exploitation in 30 days · percentile 51
Auth required
No
Published
Oct 29, 2024
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-29, CWE-22
SSVC (CISA)
Exploitation: proof of concept · Automatable: no · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Langchain.js.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm langchain < 0.2.19 0.2.19 npm install langchain@0.2.19

Per OSV / GitHub Advisories (GHSA-hc5w-c9f8-9cc4). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
langchainlangchain.js0.2.5

Official sources

References

Links published by the sources. Open them with care.