Critical Security Flaw in SageMaker Python SDK: Remote Code Execution Risk

sagemaker Updated 06 Mar 2026

Summary

05/03/2026
HIGH
Yes i
High
8.4

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 ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for sagemaker.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback