VDB

CVE-2024-7774

CVE-2024-7774 PUBLISHED CVSS 6.5 MEDIUM

Path Traversal in langchain-ai/langchainjs

Reported by @huntr_ai · Published October 29, 2024

langchain is fixed in 0.2.19 (npm)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
langchainnpm0.2.19
kibana-8Chainguard8.16.1-r1
langchain-ai\/langchainjslangchain-ai0.2.19
langchain-ai/langchainjslangchain-ai0.2.19

Risk scores

CVSS 3.0
6.5
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Affected products

VendorProductVersions
langchain-ailangchain-ai/langchainjsunspecified
langchain-ailangchain-ai\/langchainjs0
langchain-ailangchain-ai/langchainjs*
PyPIlangchain0
chainguardkibana-80
npmlangchain0

Timeline

  • Oct 29, 2024 CVE Published
  • Oct 29, 2024 Coalition ESS Score (9 in total, the first dated here)
  • Oct 29, 2024 CVE Updated
  • Oct 29, 2024 PoC Published
  • Oct 30, 2024 EPSS Score (30 in total, the first dated here)
  • Mar 9, 2026 Security Advisory

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2024-7774
vulnetix vdb fixes CVE-2024-7774

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-7774/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›