PyPI: sagemaker

CVE-2026-8596

Safety vulnerability ID: SFTY-20260521-74722

Safety legacy ID: pyup.io-98666

Affected versions of the sagemaker package are vulnerable to Cleartext Storage of Sensitive Information due to the ModelBuilder/Serve component placing an HMAC signing key into a container environment variable in plaintext. When ModelBuilder builds and deploys models with the TorchServe, Multi-Model Server, TensorFlow Serving, SMD, or Triton model servers, the SDK generates an HMAC secret used for model artifact integrity verification and stores it as the SAGEMAKER_SERVE_SECRET_KEY environment variable on the SageMaker model container, which is then returned in plaintext by the DescribeModel, DescribeEndpointConfig, and DescribeModelPackage APIs. A remote authenticated actor with permission to call those describe APIs and S3 write access to the model artifact path can recover the key, forge valid integrity signatures for crafted artifacts, and execute arbitrary code in the inference container under the SageMaker execution role's IAM permissions.

Created at: May 21, 2026Updated at: May 21, 2026

Overview

Cleartext storage of HMAC signing key in Amazon SageMaker Python SDK ModelBuilder/Serve path

Advisory

Affected versions of the sagemaker package are vulnerable to Cleartext Storage of Sensitive Information due to the ModelBuilder/Serve component placing an HMAC signing key into a container environment variable in plaintext. When ModelBuilder builds and deploys models with the TorchServe, Multi-Model Server, TensorFlow Serving, SMD, or Triton model servers, the SDK generates an HMAC secret used for model artifact integrity verification and stores it as the SAGEMAKER_SERVE_SECRET_KEY environment variable on the SageMaker model container, which is then returned in plaintext by the DescribeModel, DescribeEndpointConfig, and DescribeModelPackage APIs. A remote authenticated actor with permission to call those describe APIs and S3 write access to the model artifact path can recover the key, forge valid integrity signatures for crafted artifacts, and execute arbitrary code in the inference container under the SageMaker execution role's IAM permissions.

Affected Package

Affecting sagemaker package, versions
>=2.199.0,<=2.257.1
>=3.0.0,<=3.7.1

Also affects

---

How to Fix

Upgrade
sagemaker
to
2.257.2
3.8.0
or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more