Skip to content
SSRF Disclosed report Intermediate

Full Read SSRF And Internal Network access on *.reticulum.io and hubs.mozilla.com

The avatar-import feature fetched a user-supplied URL server-side and rendered it as a screenshot, but the URL filter could be bypassed by loading a page whose JavaScript redirected the renderer to an internal address. This let an attacker reach internal services such as the local Chrome debugging port and read their responses through the generated image.

r3dpars3c Follow

Originally disclosed on Mozilla

  • Fixed in 2 months
  • Paid in 3 months
  • Disclosed after 2 months
Text
Hello There !
There is Full Read Server Side Request Forgery (SSRF) vulnerability on hubs.mozilla.com and *.reticulum.io. allowing Internal Network Access.

Description.
Hubs allows users to import avatar using url defined by users. The server makes POST request to /api/v1/media endpoint with users provided url parameter. If the response is html, Then server converts it into png format similar to screenshot. The interesting part which i encountered with this findings were such as.
1. The backend only allows external host url i.e. not even hubs.mozilla.com or reticulum.io instances were accessible directly.
2. The server responds with status code 500 Internal server Error If the backend encounters status code other than 200.
3. The server only accpets the response of `Content-Type: text/html`. Other than this content-type urls response aren't presented to the user.
4. Direct ip address access to local environment is strictly denied by the server.

But Here are the bypasses.
#1. The 302 redirect fails to work here. The server executes the javascript on the page. So its possible to redirect the page to any desired location using `document.location` function.
#2. The internal local address is the only option to prove the internal ssrf attack. Since port 9222 is open by default allowing chrome debugging.
#3 Only /json/list endpoint were known for me till now.

Exploit.
The exploit url looks like this.
`https://www.edmodo.com/embed/popup?embed=y5456<svg/onload=document.location=\`http://127.0.0.1:9222/json/list\`>`

Building final exploit script.
`curl -X POST -H 'Content-Type: application/json' -s 'https://hubs.mozilla.com/api/v1/media' -d '{"media":{"url":"https://www.edmodo.com/embed/popup?embed=UnwantedCharacter<svg/onload=document.location=\`http://127.0.0.1:9222/json/list\`>","quality":"high"}}'`

Send this request and open the generated png url.
PS: Always add a new character along with `UnwantedCharacter` to bypass cache response.

Remedition.
The server must validate the url properly on Frontend to Backend both

Impact.
This vulnerability allows any Malicious user to force the server to make malicious request to sensitive server such as exploiting sql injection or other vulnerability present on government site etc. This also allows Full internal Network Access.

This is the origin server IP address of the hubs.mozilla.com instance.
59.2.215.98

The original report as published on Mozilla's Bugzilla, by r3dpars3c. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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 allow-list was enforced only on the initial request, so a page that ran JavaScript could redirect the headless browser to internal addresses after the check.

Impact

An attacker could force the server to make requests to internal services and read the responses, giving access to the internal network; the report only demonstrates reaching the local Chrome debugging port.

What the attacker needed

No account needed; server can reach internal hosts; Chrome debugging port open

The fix

The server should validate the URL properly on both the frontend and backend, including after any redirects or script-driven navigation.

How it was found

  1. Send a POST request to the media API with a media URL pointing to an external page that contains a script redirecting to an internal address.
  2. The server fetches the page, runs its JavaScript, and the page redirects the renderer to the internal Chrome debugging endpoint.
  3. The server converts the internal response into a PNG and returns its URL.
  4. Open the generated PNG to read the internal 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.

When you import an avatar from a link, the website's server visits that link for you and takes a picture of the page. The site tried to block internal addresses, but the page it loaded could run JavaScript that told the browser to go to an internal address instead. That let the attacker see internal services that should not be reachable from outside.

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 r3dpars3c

View all

3 more disclosed reports, best first.

More from Mozilla

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.