CVE-2024-7774
JavaScript vulnerability analysis and mitigation

Overview

A path traversal vulnerability (CVE-2024-7774) was discovered in langchain-ai/langchainjs version 0.2.5. The vulnerability exists in the getFullPath method and allows attackers to save files anywhere in the filesystem, overwrite existing text files, read .txt files, and delete files through the setFileContent, getParsedFile, and mdelete methods, which do not properly sanitize user input (NVD).

Technical details

The vulnerability is classified as a path traversal issue (CWE-22) with a CVSS v3.1 base score of 9.1 (Critical), indicating a high severity level. The attack vector is network-accessible (AV:N) with low attack complexity (AC:L), requires no privileges (PR:N), and no user interaction (UI:N). The scope is unchanged (S:U) with high confidentiality and integrity impact (C:H, I:H) but no availability impact (A:N) (NVD).

Impact

The vulnerability allows attackers to perform unauthorized file system operations including reading, writing, and deleting text files anywhere in the filesystem. This could lead to sensitive data exposure, file system manipulation, and potential system compromise (NVD).

Mitigation and workarounds

Users should upgrade to a patched version of langchainjs. The vulnerability has been fixed through improved input validation in the getFullPath method, which now includes proper path traversal checks and character validation (Github Patch).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-59041HIGH8.7
  • JavaScriptJavaScript
  • @anthropic-ai/claude-code
NoYesSep 10, 2025
CVE-2025-58764HIGH8.7
  • JavaScriptJavaScript
  • @anthropic-ai/claude-code
NoYesSep 10, 2025
CVE-2025-59049HIGH7.5
  • JavaScriptJavaScript
  • @mockoon/commons-server
NoYesSep 10, 2025
CVE-2025-59052HIGH7.1
  • JavaScriptJavaScript
  • @nguniversal/common
NoYesSep 10, 2025
CVE-2025-57520LOW2.1
  • JavaScriptJavaScript
  • decap-cms
NoNoSep 10, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management