# User can link non-public file attachments, leading to file disclose on edit by higher-privileged user

Referencing a private file ID in a public post silently re-grants public access when a privileged user edits the post, disclosing the private attachment.

- Payout: $500
- Severity: medium
- Program: Phabricator
- Found by: foobar7
- Disclosed: 2022-06-26
- Write-up quality: 7/10
- Original: https://hackerone.com/reports/763177
- Library page: https://bugbountylibrary.com/r/h1%3A763177
- Tags: area:web domain:web impact:data-leak kind:bounty platform:hackerone sev:medium technique:chained vuln:access-control vuln:business-logic vuln:info-disclosure

**Target:** Phabricator file attachment reference rendering (e.g. Maniphest tasks)
**Root cause:** When a user with access to a referenced file edits content containing the file reference, the file's view policy is silently widened to match the new context, without warning or confirmation.
**Steps:**
1. Create a private task visible only to administrators; upload an attachment and note its file ID (e.g. F27).
2. As a low-privileged user, create a public task whose description references `{F27}` plus formatting errors/typos.
3. Wait for a privileged user to view the task (file resolves for them) and edit it to fix formatting.
4. After the edit, the file's permissions are widened and the low-privileged user can access the previously private attachment.
**How found:** Observed that file references render based on viewer permission and that editing content containing a reference silently updates the file's permissions to match the new location.
**Exploitation:** Social-engineering lure: plant a private file reference in a public post with formatting mistakes so a privileged user edits it; the edit silently propagates the file's policy to public, disclosing it to the attacker.
**Insight:** In systems with inline object references (file IDs, mentions, embeds), test whether editing content re-applies the editor's permissions to the referenced object—permission propagation on edit is a common silent-disclosure vector.

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

**Reference private file ID in public task description**

```
Include a reference to the private file in the description, eg `{F27}`. Include some formatting mistakes, typos, profanity, etc to entice a higher-privileged user into editing the post.
```

