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.
Originally disclosed on HackerOne
- 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.
This will give you a 403.
##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®ion=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.
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:///.
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
- Request the image endpoint with the image parameter pointing at an internal management host that returns 403 directly.
- Observe the internal image is fetched and returned through the image service.
- Point the image parameter at the internal banner service, whose backplate parameter uses the file protocol for a local image.
- 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.