PyPi: Langchain

CVE-2023-29374

Safety vulnerability ID: 54895

This vulnerability was reviewed by experts

The information on this page was manually curated by our Cybersecurity Intelligence Team.

Created at Apr 05, 2023 Updated at Jun 14, 2024
Scan your Python projects for vulnerabilities →

Advisory

LangChain 0.0.142 includes a fix for CVE-2023-29374: The LLMMathChain chain allows prompt injection attacks that can execute arbitrary code via the Python exec method.
https://github.com/hwchase17/langchain/pull/1119
https://github.com/langchain-ai/langchain/commit/5ca7ce77cd536991d04f476e420446a3b21d2a7b

Affected package

langchain

Latest version: 0.2.5

Building applications with LLMs through composability

Affected versions

Fixed versions

Vulnerability changelog

In LangChain through 0.0.131, the LLMMathChain chain allows prompt injection attacks that can execute arbitrary code via the Python exec method. See CVE-2023-29374.


MISC:https://github.com/hwchase17/langchain/issues/1026: https://github.com/hwchase17/langchain/issues/1026
MISC:https://github.com/hwchase17/langchain/issues/814: https://github.com/hwchase17/langchain/issues/814
MISC:https://github.com/hwchase17/langchain/pull/1119: https://github.com/hwchase17/langchain/pull/1119
MISC:https://twitter.com/rharang/status/1641899743608463365/photo/1: https://twitter.com/rharang/status/1641899743608463365/photo/1

Resources

Use this package?

Scan your Python project for dependency vulnerabilities in two minutes

Scan your application

Severity Details

CVSS Base Score

CRITICAL 9.8

CVSS v3 Details

CRITICAL 9.8
Attack Vector (AV)
NETWORK
Attack Complexity (AC)
LOW
Privileges Required (PR)
NONE
User Interaction (UI)
NONE
Scope (S)
UNCHANGED
Confidentiality Impact (C)
HIGH
Integrity Impact (I)
HIGH
Availability Availability (A)
HIGH