# Bitmoji source code is accessible

Bitmoji rendering service returned 403 at root but exposed /WEB-INF/ and /META-INF/ directory listings, leaking .class/.jar files that decompiled to full source code.

- Payout: $1,000
- Severity: medium
- Program: Snapchat
- Found by: rms
- Disclosed: 2021-07-31
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/301812
- Library page: https://bugbountylibrary.com/r/h1%3A301812
- Tags: area:web domain:web impact:data-leak kind:bounty platform:hackerone sev:medium tech:java technique:recon technique:source-review vuln:access-control vuln:info-disclosure vuln:misconfiguration

**Target:** Java servlet rendering service (rendering-service.prod.us-east.bitstrips.com)
**Root cause:** Access control was enforced only on the root path; subpaths like /WEB-INF/ and /META-INF/ lacked the check and had directory listing enabled, exposing compiled Java artifacts.
**Steps:**
1. Enumerate subdomains of in-scope domains (snapchat.com, bitmoji.com, bitstrips.com).
2. Request `GET https://rendering-service.prod.us-east.bitstrips.com/` -> `403 Forbidden`.
3. Request `GET https://rendering-service.prod.us-east.bitstrips.com/WEB-INF/` and `/META-INF/` -> directory listing returned.
4. Download all .class/.jar files from the listings.
5. Decompile with `procyon-decompiler` to recover readable source.
**How found:** Reporter scanned all subdomains across in-scope domains, noticed the root returned 403, and hypothesized the access control might not cover subpaths, then probed standard Java web-app metadata directories /WEB-INF/ and /META-INF/.
**Exploitation:** Direct unauthenticated GET requests to /WEB-INF/ and /META-INF/ returned directory listings; attacker downloaded compiled classes and decompiled them offline to reconstruct Bitmoji source code. No auth or special tooling beyond a decompiler.
**Insight:** When a root path returns 403, the ACL may be path-scoped rather than app-wide; always probe Java servlet metadata dirs (/WEB-INF/, /META-INF/) and other subpaths on the same host, since directory listing there leaks compiled classes that decompile to source.

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

**Request to exposed WEB-INF directory listing**

```
When I request `GET https://rendering-service.prod.us-east.bitstrips.com/`
The response is  `403 Forbidden`

After searching, I've found [/WEB-INF/](https://rendering-service.prod.us-east.bitstrips.com/WEB-INF/) & [/META-INF/](https://rendering-service.prod.us-east.bitstrips.com/META-INF/) directories, which are accessibles and allow directory listing.
```

