Skip to content
Access control Disclosed report Intermediate

Restricted file access when it exists in old versions of task or wiki document

A file marked as viewable by no one could still be reached by another user when a reference to it remained in an older revision of a wiki page or task description. An attacker with access to the page history could open a restricted file that the owner believed was hidden.

denispugachev Follow

Originally disclosed on HackerOne

  • Disclosed after 16 hours

mongoose

Hey! I think there is strange access rules for restricted file.

Steps to reproduce:

  1. Load by User1 file and set it access level "No one" (file Id for example 12)
  2. Make wiki with text `` by User1
  3. Edit new wiki page (change all text or delete) by User1
  4. Try to access file from User2: http://phabricator.dev/F12 - User2 has access to file even if it has "No one" access level.

It happens because `` exists in old versions of wiki page and User1 can't do anything to hide his file only if he will restrict view access to entire wiki page. I think access level to file should be evaluated by current version of document, not older.

It can be reproduced also in tasks.

The original report as published on HackerOne, by denispugachev. 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 file access check was based on references found in any historical revision of a document rather than only its current version.

What the attacker needed

Two user accounts

How it was found

  1. User1 uploads a file and sets its access level to no one.
  2. User1 creates a wiki page that references the file.
  3. User1 edits the page so the reference is removed from the current text.
  4. User2 opens the file directly and still gets access.

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.

When you attach a file, you can set who can see it, and 'No one' should mean nobody else. Here a leftover mention of the file in an old version of a page still let another user open it. Access should be judged from the current version only.

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 denispugachev

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.