Skip to content
HighVulnerability

GHSA-7hh5-prp2-mfh5: Cleartext storage of HMAC signing key in Amazon SageMaker Python SDK ModelBuilder/Serve path

Published
Record updated
View JSON
Affected
  • sagemaker >= 3.0.0, <= 3.7.1, fixed in 3.8.0
  • sagemaker >= 2.199.0, <= 2.257.1, fixed in 2.257.2
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.8%

Summary

Under certain circumstances, the ModelBuilder/Serve component of Amazon SageMaker Python SDK stores an HMAC signing key in cleartext as the SAGEMAKER_SERVE_SECRET_KEY container environment variable. The DescribeModel, DescribeEndpointConfig, and DescribeModelPackage APIs return this variable in plaintext. A remote authenticated actor with describe permissions and S3 write access to the model artifact path could extract the key, forge integrity signatures for crafted model artifacts, and achieve code execution in inference containers with the SageMaker execution role's IAM permissions. Affected versions are >= v2.199.0 through <= v2.257.1, and >= v3.0.0 through <= v3.7.1.

Mitigation

Upgrade to Amazon SageMaker Python SDK v2.257.2 or v3.8.0 and rebuild any models previously created with ModelBuilder, since models built with affected versions may still hold the HMAC key in their container environment variables. Patch any forked or derivative code. If upgrading is not immediately possible, manually remove the SAGEMAKER_SERVE_SECRET_KEY environment variable by recreating the model without it in the container environment configuration.