Skip to content
Access control Disclosed report Intermediate

Possible to make restricted files public on Phabricator via Diffusion

Phabricator checked file view permissions when attaching files to most objects, but not when commits were created in Differential repositories. An attacker could make a restricted file public by referencing it in a commit message, and could find restricted files by enumeration.

dyls Follow

Originally disclosed on HackerOne

Bounty$2,000 View original
  • Fixed in 22 days
  • Paid in 22 days
  • Disclosed after 3 months

Files on Phabricator are always viewable to a user if they are attached to an object that they can view. It seems Phabricator does check if you can view a file before allowing you to a attach it. If you don't have access to the file, it will just look like this in plaintext. It seems Phabricator does not do this check when creating commits in Differential repositories. This means you make a restricted file public simply by including the syntax to attach the file in the commit message which will then by synced to Phabricator, causing the file to be made public regardless of whether you had access in the first place. It is possible to find a restricted file simply by enumeration.

File "Can View" is set to Administrator: F1718695 However the file is in the commit and viewable: F1718696 User is not an Administrator: F1718697

Impact

Gain access to restricted file objects.

Attachments

Screenshot_(283).png
Screenshot_(283).png From the original on HackerOne
Screenshot_(282).png
Screenshot_(282).png
Screenshot_(281).png
Screenshot_(281).png

The original report as published on HackerOne, by dyls. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the commit ingestion path in Differential did not apply the same file view-permission check that other attachment paths used.

Impact

A user without permission could gain access to restricted file objects, including files limited to administrators.

What the attacker needed

Ability to create commits in a Differential repo; knowledge or enumeration of file IDs

How it was found

  1. Find a restricted file by enumerating file identifiers.
  2. Include the syntax to attach that file in a commit message.
  3. Let the commit sync to Phabricator.
  4. Observe that the file is now viewable by a non-administrator.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Phabricator lets you attach files to things like tasks, and it normally checks whether you are allowed to see a file before attaching it. A commit message is another place where files can be referenced, but that check was missing there, so anyone could link a private file and make it visible to everyone. The attacker only needed to guess or enumerate file numbers to find private files.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by dyls

View all

4 more disclosed reports, best first.

More from Phabricator

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.