Intel

AIKIDO-2026-606206

sagemaker is vulnerable to Path Traversal

Path Traversal Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Yesterday

35

Low Risk

This Affects:

PYTHONsagemaker
1.45.0 - 2.257.3
Fixed in 2.257.4
3.0.0 - 3.9.0
Fixed in 3.10.0
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.

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.

Background info

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

How to fix this

Upgrade the sagemaker library to the patch version.