CVE-2024-7774: Path Traversal in langchain-ai/langchainjs

Published Oct 29, 2024
·
Updated

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 Software

3 affected componentsFixes available
npm/langchain<0.2.19
0.2.19
Langchain Langchain=0.2.5
Langchain Langchain.js=0.2.5

Event History

Oct 29, 2024
CVE Published
via MITRE·12:49 PM
Data Sourced
via MITRE·12:49 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·03:32 PM

Frequently Asked Questions

1

What is the severity of CVE-2024-7774?

The severity of CVE-2024-7774 is critical due to its potential for unauthorized file access and manipulation.

2

How do I fix CVE-2024-7774?

To fix CVE-2024-7774, upgrade to langchain version 0.2.19 or later.

3

What systems are affected by CVE-2024-7774?

CVE-2024-7774 affects langchain version 0.2.5 used in both pip and npm package installations.

4

What kind of attacks can be executed using CVE-2024-7774?

Attackers can exploit CVE-2024-7774 to save, read, overwrite, and delete files within the filesystem.

5

Is CVE-2024-7774 a zero-day vulnerability?

CVE-2024-7774 is not a zero-day vulnerability, as it has been disclosed with a known fix available.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203