CVE-2024-6982: lollms: RCE via eval() sandbox bypass in Calculate
GHSA-jccx-m9v4-9hwh HIGH CISA: ATTENDAny lollms deployment below version 9.10 (pip < 11.0.0) exposes a server-level RCE via a crafted math expression — no authentication required. Patch to 11.0.0 immediately and isolate lollms from untrusted networks in the interim. If you're running lollms in multi-user or network-exposed configurations, treat this as critical regardless of the CVSS local vector.
Risk Assessment
CVSS 8.4 HIGH with low current exploitation probability (EPSS 0.14%). The CVSS vector designates AV:L, but lollms operates as a web application — any user reaching the web UI can trigger the Calculate endpoint, effectively making this network-exploitable in practice. The sandbox escape technique via _frozen_importlib.BuiltinImporter is documented and requires only moderate Python knowledge, lowering the bar for motivated attackers. Risk is highest for teams sharing a lollms instance or exposing it beyond localhost.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| lollms | pip | < 11.0.0 | 11.0.0 |
Do you use lollms? You're affected.
Severity & Risk
Attack Surface
Recommended Action
5 steps-
PATCH
Upgrade to lollms >= 9.10 (pip install --upgrade lollms) or >= 11.0.0 per pip advisory.
-
ISOLATE
Restrict lollms to localhost or VPN-only until patched — block public network exposure immediately.
-
DETECT
Monitor for unexpected child process spawning from lollms, unusual outbound connections from the lollms host, and access logs for Calculate endpoint calls containing brackets or module references.
-
AUDIT
Inventory all lollms instances (dev, staging, prod) and verify versions.
-
HARDEN
Run lollms in a container with read-only filesystem and dropped capabilities; restrict OS-level execution from the lollms process user.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2024-6982?
Any lollms deployment below version 9.10 (pip < 11.0.0) exposes a server-level RCE via a crafted math expression — no authentication required. Patch to 11.0.0 immediately and isolate lollms from untrusted networks in the interim. If you're running lollms in multi-user or network-exposed configurations, treat this as critical regardless of the CVSS local vector.
Is CVE-2024-6982 actively exploited?
No confirmed active exploitation of CVE-2024-6982 has been reported, but organizations should still patch proactively.
How to fix CVE-2024-6982?
1. PATCH: Upgrade to lollms >= 9.10 (pip install --upgrade lollms) or >= 11.0.0 per pip advisory. 2. ISOLATE: Restrict lollms to localhost or VPN-only until patched — block public network exposure immediately. 3. DETECT: Monitor for unexpected child process spawning from lollms, unusual outbound connections from the lollms host, and access logs for Calculate endpoint calls containing brackets or module references. 4. AUDIT: Inventory all lollms instances (dev, staging, prod) and verify versions. 5. HARDEN: Run lollms in a container with read-only filesystem and dropped capabilities; restrict OS-level execution from the lollms process user.
What systems are affected by CVE-2024-6982?
This vulnerability affects the following AI/ML architecture patterns: local LLM deployments, AI assistant platforms, ML UI frameworks, agent frameworks.
What is the CVSS score for CVE-2024-6982?
CVE-2024-6982 has a CVSS v3.1 base score of 8.4 (HIGH). The EPSS exploitation probability is 0.21%.
Technical Details
NVD 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.
Exploitation Scenario
An attacker with access to the lollms web interface submits a crafted payload to the Calculate function — e.g., a Python expression leveraging `_frozen_importlib.BuiltinImporter` to load the `os` module despite `__builtins__` being disabled. The payload bypasses the math-only sandbox and executes an arbitrary OS command (e.g., spawning a reverse shell or exfiltrating ~/.env and API key files). Since no authentication is required per the CVSS vector, a threat actor scanning for exposed lollms instances can automate this at scale. The most realistic scenario is a malicious insider or external attacker on the same network exfiltrating the OpenAI/Anthropic API keys configured in the lollms instance.
CVSS Vector
CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H References
Timeline
Related Vulnerabilities
CVE-2026-1115 9.6 lollms: Stored XSS enables wormable account takeover
Same package: lollms CVE-2026-1117 8.2 lollms: Access Control bypass enables privilege escalation
Same package: lollms CVE-2025-6386 7.5 lollms: timing attack enables credential enumeration
Same package: lollms CVE-2024-6581 6.5 Lollms: SVG upload XSS enables session hijack and RCE
Same package: lollms CVE-2024-6985 4.4 lollms: path traversal allows arbitrary directory read
Same package: lollms
AI Threat Alert