Browse / Improper Output Handling / CVE-2023-36188
langchain vulnerable to arbitrary code execution
- Class
- Improper Output Handling (filed by a model that read the advisory)
- Technique
- Code and command execution
- Also involves
- Tool and Agent Misuse
- Affected
- langchain (PyPI)
- CVSS
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS
- 1.9% chance of exploitation in 30 days
How it works, in short
PALChain passes model-generated Python to exec, so crafted prompts can make the host run arbitrary code. (Our summary, written by a model. The source text is below.)
Details
An issue in langchain allows a remote attacker to execute arbitrary code via the PALChain parameter in the Python exec method.
References
- https://nvd.nist.gov/vuln/detail/CVE-2023-36188
- https://github.com/langchain-ai/langchain/issues/5872
- https://github.com/langchain-ai/langchain/pull/6003
- https://github.com/langchain-ai/langchain/pull/8425
- https://github.com/langchain-ai/langchain/commit/e294ba475a355feb95003ed8f1a2b99942509a9e
- https://github.com/advisories/GHSA-57fc-8q82-gfp3
- https://github.com/langchain-ai/langchain
- https://github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2023-109.yaml
Source: GitHub Advisory Database, used under CC BY 4.0.