CVE-2024-4343
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.
CVSS
- Version: 3.1
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Base score: 9.8
Exploitation probability (EPSS)
- Probability of exploitation in the next 30 days: 2.69%
- Percentile among all scored CVEs: 85
- Score date: 10/6/2026
EPSS (Exploit Prediction Scoring System, FIRST) estimates how likely a vulnerability is to be exploited in the wild within 30 days. It complements CVSS (impact) and CISA KEV (confirmed exploitation).
🎯 ATT&CK techniques
How this vulnerability is exploited and what the attacker gains, in MITRE ATT&CK terms.
- Exploitation
T1190Exploit Public-Facing Applicationinitial access90 % - Primary impact
T1059Command and Scripting Interpreterexecution95 %
Vulnerabilidad de inyección de comandos Python (CWE-78) en endpoint remoto sin autenticación (AV:N, PR:N). Uso de eval() permite RCE. Impacto: ejecución de código arbitrario con potencial escalada de privilegios.
Inferred by our analysis agent from the official description, CVSS vector and CWE, and checked by a supervisor. May contain errors.
🛡️ ATT&CK mitigations that cover these techniques
Affected technologies (1)
CWEs
- CWE-78
References
Raw JSON (NVD)
Show
{
"id": "CVE-2024-4343",
"cveTags": [],
"metrics": {
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2024-4343",
"role": "CISA Coordinator",
"options": [
{
"exploitation": "poc"
},
{
"automatable": "yes"
},
{
"technicalImpact": "total"
}
],
"version": "2.0.3",
"timestamp": "2024-11-18T20:29:09.480870Z"
}
}
],
"cvssMetricV30": [
{
"type": "Secondary",
"source": "security@huntr.dev",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.0",
"baseScore": 9.8,
"attackVector": "NETWORK",
"baseSeverity": "CRITICAL",
"vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"integrityImpact": "HIGH",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "HIGH",
"privilegesRequired": "NONE",
"confidentialityImpact": "HIGH"
},
"impactScore": 5.9,
"exploitabilityScore": 3.9
}
],
"cvssMetricV31": [
{
"type": "Secondary",
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 9.8,
"attackVector": "NETWORK",
"baseSeverity": "CRITICAL",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"integrityImpact": "HIGH",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "HIGH",
"privilegesRequired": "NONE",
"confidentialityImpact": "HIGH"
},
"impactScore": 5.9,
"exploitabilityScore": 3.9
}
]
},
"affected": [
{
"source": "security@huntr.dev",
"affectedData": [
{
"vendor": "imartinez",
"product": "imartinez/privategpt",
"versions": [
{
"status": "affected",
"version": "unspecified",
"lessThan": "0.6.0",
"versionType": "custom"
}
]
}
]
},
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"affectedData": [
{
"cpes": [
"cpe:2.3:a:imartinez:imartinez_privategpt:*:*:*:*:*:*:*:*"
],
"vendor": "imartinez",
"product": "imartinez_privategpt",
"versions": [
{
"status": "affected",
"version": "0",
"lessThan": "0.6.0",
"versionType": "custom"
}
],
"defaultStatus": "unknown"
}
]
}
],
"published": "2024-11-14T18:15:19.687",
"references": [
{
"url": "https://github.com/imartinez/privategpt/commit/86368c61760c9cee5d977131d23ad2a3e063cbe9",
"tags": [
"Patch"
],
"source": "security@huntr.dev"
},
{
"url": "https://huntr.com/bounties/1d1e8f06-ec45-4b17-ae24-b83a41304c15",
"tags": [
"Exploit",
"Third Party Advisory"
],
"source": "security@huntr.dev"
}
],
"vulnStatus": "Analyzed",
"weaknesses": [
{
"type": "Secondary",
"source": "security@huntr.dev",
"description": [
{
"lang": "en",
"value": "CWE-78"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "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."
},
{
"lang": "es",
"value": "Existe una vulnerabilidad de inyección de comandos de Python en el método `complete()` de la clase `SagemakerLLM` dentro de `./private_gpt/components/llm/custom/sagemaker.py` de la aplicación imartinez/privategpt, versiones hasta la 0.3.0 incluida. La vulnerabilidad surge debido al uso de la función `eval()` para analizar una cadena recibida desde un punto de conexión remoto de AWS SageMaker LLM en un diccionario. Este método de análisis no es seguro ya que puede ejecutar código Python arbitrario contenido en la respuesta. Un atacante puede explotar esta vulnerabilidad manipulando la respuesta del punto de conexión de AWS SageMaker LLM para incluir código Python malicioso, lo que lleva a la posible ejecución de comandos arbitrarios en el sistema que aloja la aplicación. El problema se solucionó en la versión 0.6.0."
}
],
"lastModified": "2026-06-17T08:01:42.750",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:pribai:privategpt:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "5AAF6727-548E-43F2-BABA-BDB23B261130",
"versionEndExcluding": "0.6.0"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "security@huntr.dev"
}