CVE-2024-6982 Remote Code Execution in Calculate Function in parisneo/lollms

High 8.4 Published Updated

Attackers can execute arbitrary code on the server by bypassing a Python sandbox in the Calculate function using importlib tricks.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-6982?

CVE-2024-6982 is a high-severity code injection vulnerability in parisneo/lollms, published on 20 Mar 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

A remote code execution vulnerability exists in the Calculate function of parisneo/lollms version 9.8. The vulnerability arises from the use of Python's `eval()` function to evaluate mathematical expressions within a Python sandbox that disables `__builtins__` and only allows functions from the `math` module. This sandbox can be bypassed by loading the `os` module using the `_frozen_importlib.BuiltinImporter` class, allowing an attacker to execute arbitrary commands on the server. The issue is fixed in version 9.10.

Weakness: CWE-94

Which versions are affected by CVE-2024-6982?

3 open source packages ship an affected version, including lollms.

PackageAffectedFixed in
lollms PyPIAll versions11.0.0
lollms PyPIAll versions11.0.0
lollms PyPIAll versions11.0.0

How do I fix CVE-2024-6982?

Upgrade lollms to 11.0.0 or later.

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

Is CVE-2024-6982 being exploited?

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

Sources

Also known as GHSA-jccx-m9v4-9hwh, PYSEC-2026-1591.

Is CVE-2024-6982 in your software?

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

Check your SBOMs for free