Executive brief
The Amazon SageMaker Python SDK is a library used to build, train, and deploy machine learning models on AWS. A security issue was identified where sensitive signing keys used to verify the integrity of model files were stored in plain text within container environment variables. An attacker with specific administrative permissions could retrieve these keys to bypass security checks and run unauthorized code within the machine learning environment, potentially gaining access to sensitive data or AWS resources.
Technical details
The vulnerability (CWE-312) exists in the ModelBuilder/Serve component of the Amazon SageMaker Python SDK. When deploying models using servers like TorchServe or TensorFlow Serving, the SDK generates an HMAC secret key for artifact integrity verification but stores it in the SAGEMAKER_SERVE_SECRET_KEY environment variable. This variable is exposed in plaintext via SageMaker 'describe' APIs (e.g., DescribeModel). An authenticated attacker with permissions to call these APIs and write access to the S3 model artifact path can extract the key, forge signatures for malicious artifacts, and achieve code execution within the inference container. The issue is resolved in versions 2.257.2 and 3.8.0; however, existing models must be rebuilt to rotate the compromised keys.
Affected products
- Amazon SageMaker Python SDK >= 2.199.0, <= 2.257.1; >= 3.0.0, <= 3.7.1
CVE identifiers
- CVE-2026-8597
- CVE-2026-8596
Timeline
- 2026-05-14: disclosed
- 2026-05-14: patched: Versions 2.257.2 and 3.8.0 released
- 2026-05-21: advisory
References
- https://github.com/aws/sagemaker-python-sdk/security/advisories/GHSA-7hh5-prp2-mfh5
- https://aws.amazon.com/security/security-bulletins/2026-031-aws
- https://github.com/aws/sagemaker-python-sdk/releases/tag/v2.257.2
- https://github.com/aws/sagemaker-python-sdk/releases/tag/v3.8.0
- https://api.github.com/repos/aws/sagemaker-python-sdk/security-advisories/GHSA-7hh5-prp2-mfh5