AWS Amazon SageMaker Python SDK Bucket Ownership Flaw Can Enable Code Execution

Note: This data is for reference and cybersecurity research purposes only.CyStack advises users not to use this information for unlawful purposes.

What is CVE-2026-112408?

CVE-2026-112408 is a vulnerability classified as Improper Verification of Source of a Communication Channel, affecting Amazon SageMaker Python SDK (affected versions: < 2.257.3 and 3.0.0 – < 3.10.0). This vulnerability is rated Critical, with a CVSS score of 9.4. Current sources do not report this vulnerability as exploited.

Overview

Original source data

Missing verification of source of a communication channel in the default_bucket() function in Amazon SageMaker Python SDK V3 before 3.10.0 and V2 before 2.257.3 might allow remote actors to achieve code execution in the target SageMaker execution environment and obtain IAM credentials via pre-creation of a predictably named S3 bucket that the SDK uses without ownership validation. To remediate this issue, users should upgrade to Amazon SageMaker Python SDK 3.10.0 (V3) or 2.257.3 (V2).

Affected products and scope

  • AWS Amazon SageMaker Python SDK V2: versions earlier than 2.257.3 are affected.
  • AWS Amazon SageMaker Python SDK V3: versions from 3.0.0 through versions earlier than 3.10.0 are affected.
  • AWS identifies 2.257.3 as addressed for V2 and 3.10.0 as addressed for V3. The available evidence does not establish the status of versions outside the listed branches.

Technical details

AWS Amazon SageMaker Python SDK uses the default_bucket() function to select a predictably named Amazon S3 bucket but does not verify that the bucket belongs to the caller's AWS account. Because S3 bucket names are globally unique, an unauthenticated remote actor can pre-register the same name when the target account does not already have its default bucket. The SDK may then read or replace artifacts written there, including training scripts, source code, and model artifacts; replacing those artifacts could lead to code execution in a remote SageMaker execution environment and exposure of the execution role's IAM credentials. This is CWE-940, improper verification of the source of a communication channel. The available evidence does not establish the exact bucket-naming algorithm, all affected call paths beyond default_bucket(), or the specific permissions attached to an exposed execution role.

Exploitability

The flaw is remotely reachable over the network, and the AWS advisory describes an unauthenticated actor. A key precondition is that the target user's default bucket does not already exist in the target account, while the attacker must be able to pre-register the predictable bucket name. The supplied record does not mark a public exploit, but known-exploited status is not established and the reviewed sources do not provide a current determination of observed exploitation. The record does not indicate that direct user interaction is required.

Technical impact

An attacker may read or replace training scripts, source code, and model artifacts written by the SDK to a claimed bucket. Replaced artifacts could result in code execution in a remote SageMaker execution environment. The flaw may also expose IAM credentials for the SageMaker execution role, so the potential effect on other AWS resources depends on that role's permissions. Workflow and artifact integrity are at risk, but the exact blast radius cannot be determined without the deployment configuration and IAM policy.

Business impact

Workflows using AWS Amazon SageMaker Python SDK for model training or deployment may consume artifacts controlled by an external actor if the default bucket does not yet exist and its name is claimed first. Replaced artifacts could alter training scripts, source code, or model artifacts processed by the workflow, potentially leading to code execution in the SageMaker environment. If execution-role credentials are exposed, further impact depends on that IAM role's permissions and may extend to other AWS resources it can access. The available record does not establish a specific data breach, compromise, or exploitation campaign.

Remediation

  1. Upgrade AWS Amazon SageMaker Python SDK V2 to 2.257.3 or V3 to 3.10.0, according to the branch in use.
  2. If an upgrade is not immediately possible, pass an S3 bucket owned by the organization's account explicitly through the default_bucket parameter of sagemaker.Session or through the SageMaker SDK configuration file. Do not rely on the automatically generated default bucket name.
  3. Review and update any forked or derivative code so that it incorporates the corresponding fixes.
  4. If an affected deployment used an automatically selected bucket without verified ownership, assess whether artifacts could have been replaced and whether execution-role credentials could have been exposed under the organization's incident-response process.

Detection

  1. Inventory Python environments, lockfiles, and deployment images containing the sagemaker package, identify whether each deployment uses V2 or V3, and compare the installed version with the boundaries listed in affected_summary.
  2. Review source code and configuration for calls to default_bucket() or default_bucket settings, and determine whether an S3 bucket owned by the organization's account is supplied explicitly.
  3. For deployments that rely on an automatically selected bucket, verify that the selected bucket is owned by the expected AWS account. If ownership cannot be confirmed, treat the deployment as potentially exposed.
  4. As a precaution, review S3 and SageMaker audit data for unexpected bucket creation, object replacement, or artifact access associated with affected workflows. These are defensive review points, not vendor-confirmed indicators.
  5. Do not treat the absence of suspicious log events as proof that the environment is safe.
Sources (16)
Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.