CVE-2024-21513: Code Injection

Published Jul 15, 2024
·
Updated

Versions of the package langchain-experimental from 0.0.15 and before 0.0.21 are vulnerable to Arbitrary Code Execution when retrieving values from the database, the code will attempt to call 'eval' on all values. An attacker can exploit this vulnerability and execute arbitrary python code if they can control the input prompt and the server is configured with VectorSQLDatabaseChain.

Notes:

Impact on the Confidentiality, Integrity and Availability of the vulnerable component:

Confidentiality: Code execution happens within the impacted component, in this case langchain-experimental, so all resources are necessarily accessible.

Integrity: There is nothing protected by the impacted component inherently. Although anything returned from the component counts as 'information' for which the trustworthiness can be compromised.

Availability: The loss of availability isn't caused by the attack itself, but it happens as a result during the attacker's post-exploitation steps.

Impact on the Confidentiality, Integrity and Availability of the subsequent system:

As a legitimate low-privileged user of the package (PR:L) the attacker does not have more access to data owned by the package as a result of this vulnerability than they did with normal usage (e.g. can query the DB). The unintended action that one can perform by breaking out of the app environment and exfiltrating files, making remote connections etc. happens during the post exploitation phase in the subsequent system - in this case, the OS.

AT:P: An attacker needs to be able to influence the input prompt, whilst the server is configured with the VectorSQLDatabaseChain plugin.

Affected Software

2 affected componentsFixes available
pip/langchain-experimental>=0<0.0.21
0.0.21
Langchain langchain-experimental>=0.0.15<0.0.21

Event History

Jul 15, 2024
CVE Published
via MITRE·05:00 AM
Data Sourced
via MITRE·05:00 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·06:30 AM

Frequently Asked Questions

1

What is the severity of CVE-2024-21513?

CVE-2024-21513 has a high severity due to its potential for arbitrary code execution.

2

How do I fix CVE-2024-21513?

To fix CVE-2024-21513, update the langchain-experimental package to version 0.0.21 or later.

3

What versions are affected by CVE-2024-21513?

CVE-2024-21513 affects versions of langchain-experimental from 0.0.15 up to but not including 0.0.21.

4

What type of vulnerability is CVE-2024-21513?

CVE-2024-21513 is classified as an Arbitrary Code Execution vulnerability.

5

Who can exploit CVE-2024-21513?

CVE-2024-21513 can be exploited by attackers who can manipulate database values that trigger the 'eval' function.

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