Skip to content
SSRF Write-up Intermediate

Breaking “Perimeter Leak”: How a Misconfigured Spring Boot Ap

A Spring Boot Actuator endpoint exposed a proxy that allowed server-side requests to the EC2 metadata service, enabling theft of temporary IAM credentials. The attacker then used those credentials to generate a pre-signed S3 URL and fetched it through the same proxy, bypassing the data perimeter to read a protected flag.

Kislay Kumar Follow

Published on kislay00.medium.com

Wiz’s first Cloud Security Championship challenge, “Perimeter Leak,” is a great example of how a single misconfiguration can undermine a carefully designed AWS data perimeter. In this writeup, I’ll walk through how I solved it using Spring Boot Actuator, SSRF to IMDSv2, and S3 pre‑signed URLs.

Kislay Kumar, on kislay00.medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

How it worked

Root cause

Likely the Spring Boot Actuator endpoints were exposed without proper access control, and a custom proxy endpoint allowed requests to internal IP addresses and AWS hostnames without sufficient validation.

Impact

An attacker could steal temporary IAM credentials and use them to read a protected S3 object, bypassing the data perimeter that restricted direct access.

What the attacker needed

Shell access on an EC2 instance; basic auth credentials for the app; the app has Actuator and /proxy exposed

The fix

The text does not state that the issue was fixed; it should be fixed by hardening Actuator exposure, restricting or removing generic proxy endpoints, and locking down IAM roles.

How it was found

  1. Discover exposed Actuator endpoints and list mappings to find the /proxy route.
  2. Use /proxy to request an IMDSv2 token from the metadata service.
  3. Use the token to retrieve the IAM role name from the metadata service.
  4. Use the token to fetch temporary IAM credentials for that role.
  5. Generate a pre-signed URL for the target S3 object using the stolen credentials.
  6. Send the pre-signed URL through /proxy to fetch the flag from within the VPC.

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 write-up has not been written yet. The Original tab links to the source.

The application had a feature that let it fetch other web addresses for you. Because the server could reach its own cloud metadata service, an attacker could trick it into revealing secret login keys. Those keys then allowed access to a protected file in cloud storage.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.