Skip to main content
← All vulnerabilities
CVE-2024-7774GHSA-HC5W-C9F8-9CC4

Path Traversal in langchain-ai/langchainjs

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 0.2.19
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: partial

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • langchain-ai langchain-ai/langchainjs

    fixed in 0.2.19

  • langchainnpm

    fixed in 0.2.19

References 2

huntr.com

GitHub · langchain-ai/langchainjs