Intel

AIKIDO-2026-606206

sagemaker is vulnerable to Path Traversal

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Jul 20, 2026
July 20, 2026

35

CVE Score

Low

Path Traversal

Are you affected? Scan for Free

TL;DR

The SDK downloads files from S3 to the local filesystem in several helpers, including Session.download_data, _download_files_under_prefix, the MLflow model artifact downloader, and the local transform job. These helpers build each local destination path by joining the target directory with the S3 object key and write the file without checking that the resolved path stays inside the target directory. An actor who can place objects with crafted keys containing relative path segments in a downloaded S3 prefix can cause files to be written outside the intended directory, resulting in arbitrary file write. The fix adds a validate_path_within_directory helper that canonicalizes paths with os.path.realpath and rejects any destination that escapes the target directory.

How do I fix this?

Upgrade the sagemaker library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application downloads S3 objects whose keys can be influenced by an untrusted party.

Package

Versions

1.45.0 - 2.257.3

Fixed in 2.257.4

3.0.0 - 3.9.0

Fixed in 3.10.0

Background info

sagemaker is vulnerable to Path Traversal in versions 1.45.0 - 2.257.3 and 3.0.0 - 3.9.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea