CVE-2024-46946

langchain_experimental (aka LangChain Experimental) 0.1.17 through 0.3.0 for LangChain allows attackers to execute arbitrary code through sympy.sympify (which…

Critical · published September 19, 2024

CVSS v3.1
9.8
EPSS
1%
Percentile
72.0
In the wild
Unconfirmed
What it is

🔥 A seemingly innocent method could let attackers run wild with arbitrary code! Just a few lines of input into the LLMSymbolicMathChain are all it takes to turn your code execution into chaos! Think of it as a restaurant that allows customers to cook their own meals in the kitchen without supervision. One rogue chef can turn a simple dish into a disaster, serving up recipes that ruin the entire dining experience! This vulnerability could lead to an attacker executing any code they wish, potentially compromising your entire system. Imagine the chaos: unauthorized data access, system manipulation, and a complete takeover of your application. It's a stark risk that could leave your platform in shambles!

Put simply

Think of it as a restaurant that allows customers to cook their own meals in the kitchen without supervision. One rogue chef can turn a simple dish into a disaster, serving up recipes that ruin the entire dining experience! In versions 0.1.17 through 0.3.0 of langchain_experimental, the LLMSymbolicMathChain leverages sympy.sympify, which uses eval to execute code. This oversight allows attackers to craft inputs that could execute arbitrary commands with the same privileges as the application.

What to do

This vulnerability could lead to an attacker executing any code they wish, potentially compromising your entire system. Imagine the chaos: unauthorized data access, system manipulation, and a complete takeover of your application. It's a stark risk that could leave your platform in shambles! Immediately upgrade langchain_experimental to version 0.3.1 or later to close this loophole. Review your code for any unsafe use of eval or similar methods to ensure that your application is protected from similar vulnerabilities. Conduct a thorough security audit to identify any additional risks! You've got this! With these steps in place, you're on your way to becoming a security hero! 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.01387 · 72.0th percentile
Published
2024-09-19T00:00Z
EPSS history
Timeline
  • 19 SEP 00:00Z
    langchain_experimental (aka LangChain Experimental) 0.1.17 through 0.3.0 for LangChain allows attackers to execute arbitrary code through sympy.sympify (which…
    cvelistv5