Skip to content
SSRF Disclosed report Advanced CVE-2021-22969

SSRF mitigation bypass using DNS Rebind attack

The upload feature allowed fetching files from remote servers, and although protections blocked access to the AWS metadata service, the reporter bypassed them using DNS rebinding to retrieve AWS IAM keys when the application runs in the cloud.

adrian_t Follow

Originally disclosed on HackerOne

  • Triaged in 29 hours
  • Fixed in 28 days
  • Disclosed after 13 months

We noticed that the upload functionality contains the ability to upload files from remote server, however there are some mitigations against accessing the AWS Instance Metadata service.

We've managed to bypass these mitigations using DNS rebinding and we've managed to fetch the AWS IAM keys when Concrete CMS is running in the cloud.

We've used http://1u.ms/ service for DNS rebinding, please see screenshots with evidence.

Impact

An attacker can bypass the SSRF protections and he can fetch the AWS IAM keys under which the application is running. From here on he can do enumeration and mount other attacks.

Attachments

fetch_IAM_role.png
fetch_IAM_role.png From the original on HackerOne
DNS-rebinding.png
DNS-rebinding.png
IAM_keys.png
IAM_keys.png

The original report as published on HackerOne, by adrian_t. 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

Likely the SSRF protection validated the hostname or resolved IP only once, so a DNS rebinding service could later resolve the same hostname to the cloud metadata address.

Impact

An attacker could bypass the SSRF protections and fetch the AWS IAM keys the application runs under, then use them for enumeration and further attacks.

What the attacker needed

Upload feature fetches remote files; app runs in AWS cloud; DNS rebinding service available

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.

The application could be told to download a file from a web address. The developers tried to stop it from reaching a special cloud address that holds secret access keys. By using a trick called DNS rebinding, which makes the same web address point to different servers over time, the reporter got around that block and read the keys.

What is SSRF?

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

More by adrian_t

View all

2 more disclosed reports, best first.

More from Concrete CMS

View all

The newest disclosed reports for this program.

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.