Skip to content

fix(auth): Prevent privilege escalation via self-writable Cognito custom attribute#165

Open
amalleramzn wants to merge 1 commit intomasterfrom
fix/cognito-privilege-escalation
Open

fix(auth): Prevent privilege escalation via self-writable Cognito custom attribute#165
amalleramzn wants to merge 1 commit intomasterfrom
fix/cognito-privilege-escalation

Conversation

@amalleramzn
Copy link
Copy Markdown
Contributor

Description of changes:
Tighten Cognito UserPoolClient attribute permissions and add server-side verification for deployment admin access. Adds WriteAttributes to restrict which attributes users can self-modify, and introduces an admin email allowlist check in the authorizer, middleware, and admin operations. Existing deployment scripts and Lambda functions are unaffected.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…tom attribute

Add WriteAttributes restriction to Cognito UserPoolClient to block
client-side writes to custom:deployment_admin and custom:wheel_group_id.
Add server-side email verification against DEPLOYMENT_ADMIN_EMAILS in
the authorizer, middleware, and deployment admin operations as
defense-in-depth. Admin API calls (deploy script, Lambda functions)
bypass WriteAttributes and continue to work.

sim: https://t.corp.amazon.com/P400495385
@amalleramzn amalleramzn requested a review from sgodbole2 March 26, 2026 17:54
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