Critical Security Flaw in SageMaker Python SDK: Remote Code Execution Risk
Summary
GHSA-5r2p-pjr8-7fh7: SageMaker Python SDK replaced eval() with safe parser in JumpStart search functionality. Affects sagemaker versions < 3.4.0. Fixed in 3.4.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The SageMaker Python SDK is a powerful tool designed to facilitate the development and deployment of machine learning models on AWS. It provides a range of functionalities, including the JumpStart feature that allows users to search for pre-built models and algorithms. However, a significant vulnerability has been identified in the search_hub() function, which could allow malicious actors to exploit unsanitized input, leading to severe security risks.
Vulnerability Detail
The vulnerability arises from the use of the eval() function within the search_hub() function of the SageMaker Python SDK. An attacker capable of manipulating query parameters could inject malicious input that triggers the eval() function, resulting in arbitrary command execution, unauthorized access to sensitive data, or compromise of the execution environment. This vulnerability is classified as Remote Code Execution (RCE) and poses a high risk to customer applications that do not properly sanitize input.
How To Fix
Latest published version: 3.27.0 as of 22 Oct 2026
pip install --upgrade "sagemaker==3.27.0"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
3.4.0
This is the first release that contains the fix.
pip install --upgrade "sagemaker==3.4.0"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
While no specific workarounds are necessary, it is crucial to implement security best practices. Ensure that all input to the SDK methods is sanitized and validated to only allow expected formats. Regularly update to the latest SageMaker Python SDK release and enforce proper access controls in environments where the SDK is deployed.
Conclusion
The vulnerability in the SageMaker Python SDK presents a significant risk due to the potential for Remote Code Execution through the search_hub() function. Users are strongly encouraged to upgrade to version 3.4.0 or later to mitigate this risk and to follow best practices for input validation and security.
See every vulnerability recorded for sagemaker →
FAQ
The vulnerability allows for Remote Code Execution (RCE) due to the unsafe use of the eval() function in the search_hub() method, which can be exploited through unsanitized input.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Check your application against this vulnerability using the Vulert playground at Vulert Scanner.
If upgrading is not feasible, ensure that you sanitize and validate all input to the search_hub() function to mitigate the risk of exploitation.
The CVSS score for this vulnerability is 8.4, indicating a high severity level.
You can find more information and documentation about the SageMaker Python SDK on the official AWS website.
References
Related vulnerabilities
Recent vulnerabilities recorded for sagemaker.