CVE-2024-6982

Remote Code Execution in Calculate Function in parisneo/lollms

State
Published
Severity
8.4 High
Published
Mar 20, 2025
Updated
Mar 20, 2025
Reserved
Jul 22, 2024

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.08.4 HighCVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H@huntr_ai

Weaknesses

  • CWE-94 Improper Control of Generation of Code

Affected Products

ProductVersions
parisneo/lollmsparisneo
  • before 9.10Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.