Skip to content
SSRF Disclosed report Advanced

SSRF chained to hit internal host leading to another SSRF which allows to read internal images.

An image-conversion endpoint fetched remote images from a user-supplied URL, letting an attacker reach internal PlayStation hosts that return 403 to the outside. Chaining it to a second internal service that rendered banners and accepted the file protocol allowed reading local files on that server.

bugdiscloseguys Follow

Originally disclosed on HackerOne

Bounty$1,000 High View original
  • Triaged in 13 hours
  • Fixed in 3 months
  • Paid in 9 days
  • Disclosed after 12 months

Summary by the program

Report Summary:

We found an SSRF at https://image.api.np.km.playstation.net/

Vulnerable endpoints: /images , /dis/images. using image GET parameter.

##Description

This endpoint allows us to fetch a remote image over HTTP protocol using the image GET parameter and convert them to the desired format using the GET parameter format.

We found that this could hit internal hosts however the response needs to be a valid image and also file protocol isn't working here.

For example :

The host https://store.mgmt.playstation.com/ (mgmt keywords hosts are meant to be internal for PSN) will respond with a 403 however I found it hosts an image that can open using this SSRF.

https://store.mgmt.playstation.com/store/api/chihiro/00_09_000/container/US/en/999/UP4134-CUSA00329_00-ONNTGAME00000001/1429722215000/image?_version=00_09_000&platform=chihiro&w=225&h=225&bg_color=000000&opacity=100

This will give you a 403.

Using SSRF to open this URL: https://image.api.np.km.playstation.net/images/?format=png&image=https%3a//store.mgmt.playstation.com/store/api/chihiro/00_09_000/container/US/en/999/UP4134-CUSA00329_00-ONNTGAME00000001/1429722215000/image%3f_version%3d00_09_000%26platform%3dchihiro%26w%3d225%26h%3d225%26bg_color%3d000000%26opacity%3d100

##Taking it further and finding another SSRF to extract internal images using file protocol.

We found an internal host of PSN which serves remote images with our given text (PhantomJs) on the further analysis we found this service could make use of file protocol as well and hence we could extract internal images as PoC.

Host : https://dis.api.np.playstation.net/dis/v1/banners?backplate=https://homer.dl.playstation.net/pr/bam-art/272/352/44592b67-85ac-41d6-b310-334363c5ea58.jpg&dimensions=790x250&price=$36.99&price_discount=$24.41&format[]=PS4&type=Full Game&locale=en_CA&cta=Download Now!&output=png&tpl=banner-web-store&store=game&region=us&

Opening the above URL will result in a timeout.

We use our SSRF to hit on this host and abuse the other SSRF to read internal files/images.

https://image.api.np.km.playstation.net/dis/images/?format=png&image=https%3A%2F%2Fdis.api.np.playstation.net%2Fdis%2Fv1%2Fbanners%3Fbackplate%3Dfile:////usr/share/pixmaps/system-logo-white.png%26dimensions%3D790x250%26price%3D%2436.99%26price_discount%3D%2424.41%26format%5B%5D%3DPS4%26type%3DF%22%3e%3c%73%3eull+Game%26locale%3Den_CA%26cta%3DDownload+No%26output%3Dsvg%26tpl%3Dbanner-web-store%26store%3Dgame%26region%3Dus%26

Flow is:

image.api.np.km.playstation.net -> dis.api.np.playstation.net -> fetches the local image using file://-> adds given data on image -> image served on (dis.api.np.playstation.net) -> images served to us (using image.api.np.km.playstation.net)

##Steps to reproduce:

To open file:////usr/share/pixmaps/system-logo-white.png on dis.api.np.playstation.net host using image.api.np.km.playstation.net.

Impact

SSRF to local images read using file:///.

The original report as published on HackerOne, by bugdiscloseguys. 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 image-fetching endpoints accepted arbitrary user-supplied URLs without restricting them to allowed hosts or schemes, and the internal banner service also allowed the file protocol.

Impact

An attacker could reach internal hosts and read local images on the internal banner service via the file protocol.

What the attacker needed

Ability to send requests to the image endpoint; internal hosts reachable from the service

How it was found

  1. Request the image endpoint with the image parameter pointing at an internal management host that returns 403 directly.
  2. Observe the internal image is fetched and returned through the image service.
  3. Point the image parameter at the internal banner service, whose backplate parameter uses the file protocol for a local image.
  4. Receive the locally read image rendered back through the chain.

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.

A server-side request forgery (SSRF) happens when a website fetches a URL you supply, so you can make the server visit places you cannot reach yourself, such as internal machines. Here the image service fetched pictures from any address, and a second internal service could also read files stored on its own disk. Chaining the two let the researcher pull internal images out.

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 bugdiscloseguys

View all

12 more disclosed reports, best first.

More from PlayStation

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.