# Possible to make restricted files public on Phabricator via Diffusion

Commit messages in Differential repos were parsed for file-attach syntax without a view-permission check, letting any user make restricted files public via enumeration.

- Payout: $2,000
- Severity: medium
- Program: Phabricator
- Found by: dyls
- Disclosed: 2022-07-29
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1560717
- Library page: https://bugbountylibrary.com/r/h1%3A1560717
- Tags: area:web domain:web impact:data-leak kind:bounty platform:hackerone sev:medium tech:php technique:source-review vuln:access-control vuln:idor vuln:info-disclosure

**Target:** Phabricator Diffusion/Differential commit message file-attachment rendering
**Root cause:** File attachment syntax `{F<id>}` in commit messages is rendered and grants view access without verifying the committer can view the referenced file, unlike normal object attachment which enforces the check.
**Steps:**
1. Enumerate file IDs (e.g. `F1718695`) to find restricted files.
2. Create a commit in a Differential repository whose message contains `{F1718695}`.
3. Push/sync the commit to Phabricator so the message is parsed.
4. As a non-admin user, view the file — it is now accessible despite 'Can View' set to Administrator.
**How found:** Noticed that normal attachment of an inaccessible file renders as plaintext `{F99999999999}` (permission check present), but commit messages in Differential repos skip that check — a differential in enforcement between two code paths handling the same syntax.
**Exploitation:** Attacker with commit access to any Differential repo embeds `{F<id>}` for a restricted file in a commit message; Phabricator syncs and renders the reference, making the file viewable to the attacker and others, bypassing the Administrator-only view policy.
**Insight:** When a product enforces an access check in one rendering path (object attachment) but reuses the same markup syntax in another (commit messages, comments, imports), test each path independently — the check is often only wired into the primary one.

