Skip to content
Access control Disclosed report Intermediate

A potential risk in the experimental-programmatic-access-ccft which can be used to privilege escalation.

The experimental-programmatic-access-ccft application, when deployed from the AWS Serverless Application Repository, creates a Lambda function whose role can call sts:AssumeRole against any resource. A malicious user could abuse that permission to assume roles in any AWS account within the organisation, escalating privileges.

zolaer9527 Follow

Originally disclosed on HackerOne

High 7.3 View original
  • Fixed in 33 hours
  • Disclosed after 9 days

Summary: I found a potential risk in the experimental-programmatic-access-ccft when I deployed it in the AWS Serverless Application Repository. A malicious can leverage the "sts:AssumeRole" permissions for "*" resources to escalate permission.

Description: The experimental-programmatic-access-ccft application creates a function named ExtractCarbonEmissionsFunction, and the associated role is assigned policies with permissions such as "sts:AssumeRole " for "*" resources. A malicious user can leverage the "sts:AssumeRole" permissions to assume into any AWS Account in the AWS Organization, resulting in privilege escalation. This poses a significant security risk to the account used to deploy the application.

Remediation Instructions

  1. Use finer-grained authorization policies to replace the AWS-managed policies. And use the specific resource names to replace the "*".
  2. The permissions for STS resources should be removed if they do not affect normal functionality.
  3. Add a permissions boundary to restrict the permission.

Supporting Material/References:

  • Indicate the Amazon service or product that this vulnerability occurs on: (AWS S3, Amazon Lambda, etc): Amazon Lambda

Impact

Summary:

A malicious user could leverage these permissions to escalate his/her privilege.

The original report as published on HackerOne, by zolaer9527. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The deployed Lambda role was granted sts:AssumeRole on all resources ("*") instead of being limited to specific roles and resources.

Impact

A malicious user could escalate their privileges by assuming roles in any AWS account in the organisation, which the report says poses a significant risk to the deploying account.

What the attacker needed

Deploy the app from the Serverless App Repository

The fix

The role should use finer-grained policies with specific resource names instead of "*", remove the STS permissions if they are not needed, and add a permissions boundary.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When you deploy an app in AWS, it runs with a set of permissions. This app's permissions were far too broad: it was allowed to take on roles in any account, not just the ones it needed. Someone who can use that app could therefore gain more access than intended.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by zolaer9527

View all

2 more disclosed reports, best first.

More from AWS VDP

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.