The user, who was deleted from Github Organization, still can access all functions of federalist, in case he didn't do logout
The application only checked the user's GitHub organization membership at login time, so a user removed from the organization could still perform actions such as creating or deleting sites if they remained logged in. An attacker with a previously valid session could continue to use organization functions after their access was revoked.
- Triaged in 3 days
- Fixed in 49 days
- Paid in 5 days
- Disclosed after 2 months
Summary by the researcher
Thanks to the 18F team for the great experience, fast fix and the bounty!
This report describes authentication issue, when the user, whose privileges was removed, still could access control panel instruments. Issue was fixed by implementing periodic user permissions checks.
##References Running Federalist locally
The report
##Description Hi. I found a non-critical session management bug, which still can have serious impact in some scenarios. When user perform login to the Federalist through Github, federalist checks his Organization ID (but only upon login). When the user was deleted from organization for some reasons, but he was logged in the Federalist (or saved his session cookies), he can still do any action on behalf of organization (create sites, delete sites etc).
##Reproduction Steps & POC
- Add a test user to your organization, which have access to the federalist.
- Login to the Federalist.
- Remove the user from organization, or leave organization
- Try to create or delete the site. Federalist doesn't know that this user has no permissions, and will allow him to use functions.
##Suggested fix
You should implement Organization ID checking in the requests.
Upon login, the endpoint /v0/me is called (once). But it can be a good idea to call it in a random periods of time and check the organization ID, and in case it will return 403 - invalidate user session.
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
The application checked the user's organization membership only during login and did not re-verify permissions on subsequent requests.
Impact
A user removed from the organization could still create or delete sites on behalf of the organization.
What the attacker needed
A GitHub account; membership in a GitHub organization; access to Federalist; victim remains logged in
The fix
The issue was fixed by implementing periodic user permission checks.
How it was found
- Add a test user to your organization who has access to Federalist.
- Log in to Federalist as that user.
- Remove the user from the organization or have them leave.
- Try to create or delete a site; the action is still allowed.
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 log in to a website using another service like GitHub, the site often checks your permissions only once at that moment. If someone later removes your access, the site may not notice until you log in again. This means a person who was removed from a team could still use the site's features if they kept their browser session open.
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.