Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1310 CNY

100%

CVE-2024-3121 PoC — Remote Code Execution in create_conda_env function in parisneo/lollms

Source
Associated Vulnerability
Title:Remote Code Execution in create_conda_env function in parisneo/lollms (CVE-2024-3121)
Description:A remote code execution vulnerability exists in the create_conda_env function of the parisneo/lollms repository, version 5.9.0. The vulnerability arises from the use of shell=True in the subprocess.Popen function, which allows an attacker to inject arbitrary commands by manipulating the env_name and python_version parameters. This issue could lead to a serious security breach as demonstrated by the ability to execute the 'whoami' command among potentially other harmful commands.
Description
Remote Code Execution in create_conda_env function in parisneo/lollms
Readme
# CVE-2024-3121 - Remote Code Execution (RCE) in `parisneo/lollms`

**Discovered by:** Syed Jan Muhammad Zaidi  
**GitHub:** [dark-ninja10](https://github.com/dark-ninja10)  
**CVE ID:** CVE-2024-3121  
**Repository Affected:** [parisneo/lollms](https://github.com/ParisNeo/lollms)

---

## 🧨 Vulnerability Summary

A **Remote Code Execution (RCE)** vulnerability exists in the `create_conda_env` function of the `lollms` framework. This function constructs a system command using unsanitized input, allowing attackers to inject arbitrary commands and gain code execution on the host.

---

## 🔥 Impact

An attacker with access to the `env_name` input parameter can execute arbitrary OS-level commands. This can result in:

- Complete system compromise  
- Unauthorized data access or modification  
- Installation of backdoors, malware, or crypto miners  
- Lateral movement within the network

---

## 💣 Vulnerable Code

```python
process = subprocess.Popen(f'{conda_path} create --name {env_name} python={python_version} -y', shell=True)
```

Issue: The env_name variable is directly interpolated into a shell command without input validation or escaping, making it susceptible to shell injection.

## 🏷️ References
[CVE-2024-3121 - NVD](https://nvd.nist.gov/vuln/detail/CVE-2024-3121)

[parisneo/lollms](https://github.com/ParisNeo/lollms)

[Full Huntr report](https://huntr.com/bounties/db57c343-9b80-4c1c-9ab0-9eef92c9b27b)
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →