CVE-2023-39662 llama-index vulnerable to arbitrary code execution

Critical 9.8 Published Updated

Remote attackers can execute arbitrary code via the exec parameter in PandasQueryEngine, affecting users of the llama_index library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-39662?

CVE-2023-39662 is a critical code injection vulnerability in n/a, published on 15 Aug 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

An issue in llama_index v.0.7.13 and before allows a remote attacker to execute arbitrary code via the `exec` parameter in PandasQueryEngine function.

Weakness: CWE-74

Which versions are affected by CVE-2023-39662?

3 open source packages ship an affected version, including llama-index. It affects 1 product.

PackageAffectedFixed in
llama-index PyPIAll versions0.7.14
llama-index PyPIAll versions0.9.14
llama-index PyPIAll versions0.9.14

Products include Llamaindex Project Llamaindex.

How do I fix CVE-2023-39662?

Upgrade llama-index to a fixed version for your release line: 0.7.14 or 0.9.14.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2023-39662 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-39662 exists.

Sources

Also known as GHSA-2xxc-73fv-36f7, PYSEC-2023-148.

Is CVE-2023-39662 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free