Skip to content

sagemaker: restrict model repository paths to configured root#8630

Open
HyperPS wants to merge 2 commits intotriton-inference-server:mainfrom
HyperPS:fix/sagemaker-path-traversal
Open

sagemaker: restrict model repository paths to configured root#8630
HyperPS wants to merge 2 commits intotriton-inference-server:mainfrom
HyperPS:fix/sagemaker-path-traversal

Conversation

@HyperPS
Copy link
Copy Markdown
Contributor

@HyperPS HyperPS commented Feb 1, 2026

Summary

This PR fixes a security issue in the SageMaker /models API where a user-controlled url parameter could escape the configured model repository root.

Problem

The SageMaker model load API accepted arbitrary filesystem paths without canonicalization or confinement, allowing:

  • Traversal of /, /proc, /sys
  • Recursive traversal via /proc/<pid>/root
  • CPU and I/O exhaustion (DoS)

Fix

  • Canonicalize user-supplied paths using realpath
  • Enforce confinement within model_repository_path_
  • Reject non-directory and escaping paths

Security Impact

  • Prevents arbitrary filesystem traversal
  • Prevents unauthenticated remote DoS
  • Restores SageMaker trust boundary

Testing

  • Valid model repositories load successfully
  • Invalid paths (/, /proc, /sys) are rejected

Evidence

Video proof of DoS (100% CPU usage)

Related Issue

Reported via huntr LINK

Signed-off-by: Sarvesh Patil <psarvesh129@gmail.com>
@HyperPS HyperPS force-pushed the fix/sagemaker-path-traversal branch from c2067a2 to 6165d7d Compare February 1, 2026 19:53
@HyperPS
Copy link
Copy Markdown
Contributor Author

HyperPS commented Feb 28, 2026

Hi 👋
I noticed that PR #8659 (Path Traversal fix in SageMaker Server) has already been merged addressing this issue.
Could you please clarify whether this PR is still under consideration, and if there are any updates regarding CVE evaluation for this vulnerability now that a related fix has been merged?
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant