Skip to content

fix: validate region parameter before URL interpolation to prevent SSRF#5819

Open
lucasjia-aws wants to merge 1 commit intoaws:masterfrom
lucasjia-aws:fix/validate-region-ssrf-prevention
Open

fix: validate region parameter before URL interpolation to prevent SSRF#5819
lucasjia-aws wants to merge 1 commit intoaws:masterfrom
lucasjia-aws:fix/validate-region-ssrf-prevention

Conversation

@lucasjia-aws
Copy link
Copy Markdown
Collaborator

Issue:

SDK constructs endpoint URLs by interpolating the region parameter directly into URL strings without validation. A malicious region value can cause requests to be redirected to non-AWS hosts.

Fix:

Added a centralized region_validation module with strict regex validation for region format, and applied validate_region() at all affected endpoint URL construction sites across sagemaker-core, sagemaker-serve, and sagemaker-train.

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.

1 participant