PT-2024-30579 · Amazon · Aws Sagemaker

Published

2024-11-14

·

Updated

2025-07-17

·

CVE-2024-4343

CVSS v3.1

9.8

Critical

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions imartinez/privategpt versions up to and including 0.3.0
Description A Python command injection issue exists 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 issue 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.
Recommendations For versions up to and including 0.3.0, update to version 0.6.0 to fix the issue. As a temporary workaround, consider disabling the complete() method within the SagemakerLLM class until a patch is available. Restrict access to the ./private gpt/components/llm/custom/sagemaker.py file to minimize the risk of exploitation.

Exploit

Fix

OS Command Injection

Weakness Enumeration

Related Identifiers

CVE-2024-4343

Affected Products

Aws Sagemaker