Escalate P3 SSRF TO P1
A theme-preview endpoint fetched a user-supplied URL server-side, allowing an attacker to reach the AWS instance metadata service and obtain temporary IAM credentials. Those credentials could read container registry repositories, exposing the web application's source code and secrets, and potentially allow pushing malicious images.
medium.com
Published on medium.com
at the first what is SSRF? , SSRF stands for Server-Side Request Forgery. It’s a type of web security vulnerability that allows an attacker to make the server perform requests on behalf of the attacker.
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 theme-preview endpoint passed the user-supplied preview_url directly to a server-side HTTP client without restricting the destination host or blocking internal and metadata addresses.
Impact
The leaked credentials could expose the application's source code and secrets, and the author claims they could also be used to push malicious images that may lead to backdoors on workstations and servers, though this last part is described as a possibility rather than demonstrated.
What the attacker needed
Access to the theme-preview feature; server can reach cloud metadata
How it was found
- Find the theme-preview request that takes a preview_url parameter.
- Replace the URL with an external collaborator address and confirm the server makes the request.
- Point preview_url at the AWS metadata path for IAM security credentials and read the returned keys.
- Enumerate the permissions of the leaked credentials and find that container registry login is allowed.
- Use the credentials with the AWS CLI to list and pull container registry repositories.
- Inspect the pulled image to obtain source code, API keys, database credentials and other secrets.
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.
A server-side request forgery (SSRF) happens when a website takes a link from you and fetches it from its own servers. Because the request comes from inside the company's network, the attacker can point it at internal addresses that outsiders cannot reach, such as a cloud metadata endpoint that hands out temporary login keys. Here the preview feature fetched any URL, so the attacker got cloud credentials and used them to download private container images.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.