Python Command Injection in imartinez/privategpt
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA. Impact type from CWE-78.
Summary
A Python command injection vulnerability exists in the `SagemakerLLM` class's `complete()` method within `./private_gpt/components/llm/custom/sagemaker.py` of the imartinez/privategpt application, versions up to and including 0.3.0. The vulnerability arises due to the use of the `eval()` function to parse a string received from a remote AWS SageMaker LLM endpoint into a dictionary. This method of parsing is unsafe as it can execute arbitrary Python code contained within the response. An attacker can exploit this vulnerability by manipulating the response from the AWS SageMaker LLM endpoint to include malicious Python code, leading to potential execution of arbitrary commands on the system hosting the application. The issue is fixed in version 0.6.0.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
- Fix · CNA imartinez/privategpt (imartinez) Fixed in 0.6.0
Timeline
- 2026-10-02 Threatist record created from CVE-2024-4343
- 2026-10-03 Alias added: GHSA-ww4x-x76m-jf7h
References
More imartinez Privategpt vulnerabilities
- TI-2024-11191 Denial of Service in imartinez/privategpt CVSS 3.0HIGH 7.5
- TI-2024-07432 Denial of Service (DOS) in imartinez/privategpt CVSS 3.0HIGH 7.5
- TI-2024-03174 Local File Inclusion in imartinez/privategpt CVSS 3.0HIGH 7.5
- TI-2024-04813 Server Side Request Forgery (SSRF) in imartinez/privategpt CVSS 3.1HIGH 7.2
- TI-2024-07443 Stored XSS in imartinez/privategpt CVSS 3.1MEDIUM 6.1
- TI-2024-05501 Open Redirect in imartinez/privategpt CVSS 3.1MEDIUM 6.1
Sources
- CVE-2024-4343 · CVE Program
- CVE-2024-4343 · NVD
- FIRST EPSS
- GHSA-ww4x-x76m-jf7h · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences