Skip to content

fix: potential s3 path traversal#5804

Merged
zhaoqizqwang merged 3 commits intoaws:masterfrom
zhaoqizqwang:s3-path-traversal-fix
Apr 29, 2026
Merged

fix: potential s3 path traversal#5804
zhaoqizqwang merged 3 commits intoaws:masterfrom
zhaoqizqwang:s3-path-traversal-fix

Conversation

@zhaoqizqwang
Copy link
Copy Markdown
Collaborator

Fix potential s3 path traversal by using realpath() and containment checks before every S3-to-local file write

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Comment thread sagemaker-core/src/sagemaker/core/local/entities.py Outdated
Comment thread sagemaker-core/src/sagemaker/core/common_utils.py Outdated
@zhaoqizqwang
Copy link
Copy Markdown
Collaborator Author

The failed integ tests in sagemaker-core and sagemaker-train are not related to code change in this PR

@zhaoqizqwang zhaoqizqwang merged commit d05d411 into aws:master Apr 29, 2026
17 of 23 checks passed
@zhaoqizqwang zhaoqizqwang deleted the s3-path-traversal-fix branch April 29, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants