Arbitrary file operations via unvalidated store keys
Published Oct 29, 2024 · Updated Oct 29, 2024
Path traversal in LangChain.js before 0.2.19 allows remote attackers to read, overwrite, create, or delete files through crafted store keys. LocalFileStore's getFullPath joined an unvalidated key to rootPath, allowing setFileContent, getParsedFile, and mdelete to escape the configured directory. Exposure requires an application to pass attacker-controlled keys into those methods; resulting access is limited by the hosting process's filesystem permissions.
Summary
What happened
Path traversal in LangChain.js before 0.2.19 allows remote attackers to read, overwrite, create, or delete files through crafted store keys. LocalFileStore's getFullPath joined an unvalidated key to rootPath, allowing setFileContent, getParsedFile, and mdelete to escape the configured directory. Exposure requires an application to pass attacker-controlled keys into those methods; resulting access is limited by the hosting process's filesystem permissions.
The record
- CVE
- CVE-2024-7774
- Published
- Oct 29, 2024
- Updated
- Oct 29, 2024
- Vendor
- LangChain
- Product
- LangChain.js
- Classifications
- CWE-29, CWE-22, T1005, T1565.001
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Oct 29, 2024CVE publishedPublication date reported by the CVE source.
- Oct 29, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=0 <0.2.19
- Affected versionversion=unspecified <0.2.19
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Huntr LocalFileStore traversal proof of conceptproof of concept · unverified
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo