High

SageMaker Python SDK replaced eval() with safe parser in JumpStart search functionality

  • Disclosed: 05.03.2026
  • Updated: 11.10.2026 15:18

Summary

This advisory addresses the use of the search_hub() function within the SageMaker Python SDK's JumpStart search functionality. An actor with the ability to control query parameters passed to the search_hub() function could potentially provide malformed input that causes the eval() function to execute arbitrary commands, access sensitive data, or compromise the execution environment.

A defense-in-depth enhancement has been implemented to replace code evaluation with safe string operations when processing search query parameters. This enhancement removes the use of eval() from the execution path, replacing it with a safe recursive descent parser. The change was released in SageMaker Python SDK version 3.4.0 on January 23, 2026. This advisory is informational to help customers understand their responsibilities regarding input validation and configuration security under the AWS Shared Responsibility Model.

Impact

Customer applications that pass unsanitized or untrusted input directly to the search_hub() function's query parameter could be prone to Remote Code Execution (RCE), potentially allowing attackers to execute arbitrary commands, access sensitive data, or compromise the execution environment. While the SDK was functioning within the requirements of the shared responsibility model—where input sanitization falls on the customer side—additional safeguards have been added to support secure customer implementations and provide defense-in-depth protection.

Impacted versions: All versions of SageMaker Python SDK prior to 3.4.0

Patches

On January 23, 2026, an enhancement was made to SageMaker Python SDK version 3.4.0, which replaces eval() with a safe recursive descent parser that uses string operations for pattern matching with proper operator precedence and exception handling. We recommend upgrading to version 3.4.0 or later, using the following command:

pip install --upgrade sagemaker>=3.4.0

Customers using forked or derivative code should incorporate the fixes from the referenced pull request.

Workarounds

No workarounds are needed, but as always you should ensure that your application is following security best practices:

  • Sanitize and validate input to SDK methods to ensure only expected formats are processed
  • Update to the latest SageMaker Python SDK release on a regular basis
  • Follow AWS security best practices for SDK configuration and usage
  • Ensure proper access controls are in place for environments where the SDK is deployed

References

If you have any questions or comments about this advisory, contact AWS Security via our vulnerability reporting page or email aws-security@amazon.com. Please do not create a public GitHub issue.

Acknowledgement

We thank Dan Aridor (@daridor9) and the security research community for bringing these customer security considerations to our attention through the coordinated disclosure process and for collaborating on this issue through responsible disclosure practices.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) sagemaker >= 3.0.0, < 3.4.0 3.4.0

References

CVSS score -
CVSS vector
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Weakness (CWE)
CWE-184
Platform
Python (PyPI)
Package
sagemaker
Disclosed
05.03.2026
Updated
11.10.2026 15:18

Sources and licenses

OSV / GitHub Advisory Database - GHSA-5r2p-pjr8-7fh7 - CC BY 4.0

Vulnerability history: sagemaker

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
8
First → latest
05.2024 05.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 6
  • Medium 2

Disclosures per year

  1. 2024: 2
  2. 2025: 1
  3. 2026: 5
  1. Medium · 7.2 CVE-2026-8597 >= 2.199.0, < 2.257.2, >= 3.0.0, < 3.8.0 2.257.2, 3.8.0
  2. High · 7.2 CVE-2026-8596 >= 2.199.0, < 2.257.2, >= 3.0.0, < 3.8.0 2.257.2, 3.8.0
  3. SageMaker Python SDK replaced eval() with safe parser in JumpStart search functionality this entry
    High ghsa-5r2p-pjr8-7fh7 >= 3.0.0, < 3.4.0 3.4.0
  4. High · 7.2 CVE-2026-1777 >= 3.0, < 3.2.0, < 2.256.0 3.2.0, 2.256.0
  5. High · 5.9 CVE-2026-1778 >= 3.0, < 3.1.1, < 2.256.0 3.1.1, 2.256.0
  6. Medium · 5.9 CVE-2025-0508 < 2.237.3 2.237.3
  7. High · 7.8 CVE-2024-34073 < 2.214.3 2.214.3
  8. High · 7.8 CVE-2024-34072 < 2.218.0 2.218.0

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.