Browse / Improper Output Handling / CVE-2023-44467
langchain_experimental vulnerable to arbitrary code execution via PALChain in the python exec method
- Class
- Improper Output Handling (filed by a model that read the advisory)
- Technique
- Code and command execution
- Affected
- langchain-experimental (PyPI)
- Gets past
- Earlier patch
- CVSS
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS
- 1.0% chance of exploitation in 30 days
How it works, in short
Model-generated Python run through PALChain's exec can import modules via __import__, which the earlier filter failed to block. (Our summary, written by a model. The source text is below.)
Details
langchain_experimental (aka LangChain Experimental) in LangChain before 0.0.306 allows an attacker to bypass the CVE-2023-36258 fix and execute arbitrary code via __import__ in Python code, which is not prohibited by pal_chain/base.py.
References
- https://nvd.nist.gov/vuln/detail/CVE-2023-44467
- https://github.com/langchain-ai/langchain/pull/11233
- https://github.com/langchain-ai/langchain/commit/4c97a10bd0d9385cfee234a63b5bd826a295e483
- https://github.com/langchain-ai/langchain
- https://github.com/pypa/advisory-database/tree/main/vulns/langchain-experimental/PYSEC-2023-194.yaml
- https://pypi.org/project/langchain-experimental/0.0.14
Source: GitHub Advisory Database, used under CC BY 4.0.