
Cloud Vulnerability DB
A community-led vulnerabilities database
An issue in LangChain before version 0.0.236 allows an attacker to execute arbitrary code because Python code with os.system, exec, or eval can be used. The vulnerability was discovered in June 2023 and was assigned CVE-2023-36258 with a CVSS v3.1 base score of 9.8 (CRITICAL) (NVD, CVE).
The vulnerability exists in the PALChain implementation of LangChain version 0.0.235 and earlier. The issue stems from the PALChain's _call() function, which uses a generic LLMChain to process queries and then executes the resulting code using Python's built-in exec function without proper input validation. This implementation allows attackers to inject malicious content into the LLM, prompting it to generate arbitrary Python code that gets executed (Oligo Security).
The vulnerability allows attackers to execute arbitrary code on the affected system through prompt injection techniques. Given the CVSS score of 9.8, this is considered a critical security issue that could lead to complete system compromise, allowing attackers to execute malicious commands with the same privileges as the application running LangChain (NVD).
The vulnerability was fixed in LangChain version 0.0.236. Additionally, starting from version 0.0.247, the PALChain class was moved to the LangChain-Experimental package. Organizations should upgrade to a version newer than 0.0.236 to mitigate this vulnerability (NVD).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."