Skip to content

PYSEC-2024-111

A path traversal vulnerability exists in the `getFullPath` method of langchain-ai/langchainjs version 0.2.5.

Critical Withdrawn Nov 4, 2024 PyPI
Severity
9.1 / 10
Critical · CVSS 3.1
Exploit chance (EPSS)
—
No score published
Known exploited
No
Not in CISA's catalog
Weakness
—
Not classified
Fix
None yet
No fixed version published

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.

Affected versions

PyPI

PackageVulnerableFixed in
langchain
all versions
No fix yet

How to fix

No fixed version has been published yet. Until one is, remove or replace the package, or turn off or isolate the affected feature. This page updates when a fix ships.

Severity breakdown

CVSS 3.1 9.1

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

References

Timeline

  1. Published
  2. Withdrawn
  3. Last updated by the source
AdvisorySeverityWhy it's related
GHSA-gr75-jv2w-4656
LangChain: Path traversal and sandbox escape in LangChain file-search middleware and loaders
Medium Also affects langchain
GHSA-3644-q5cj-c5c7
LangSmith SDK: Public prompt pull deserializes untrusted manifests without trust boundary warning
High Also affects langchain
GHSA-45pg-36p6-83v9
Langchain SQL Injection vulnerability
Critical Also affects langchain
PYSEC-2024-323
LangChain pickle deserialization of untrusted data
High Also affects langchain
GHSA-3hjh-jh2h-vrg6
Denial of service in langchain-community
Medium Also affects langchain
GHSA-rgp8-pm28-3759
langchain vulnerable to path traversal
High Also affects langchain
GHSA-h59x-p739-982c
LangChain directory traversal vulnerability
High Also affects langchain
GHSA-h9j7-5xvc-qhg5
langchain Server-Side Request Forgery vulnerability
High Also affects langchain
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor