Page MenuHomePhabricator

Blocked users should not be able to view private filters
Closed, ResolvedPublicSecurity

Description

  1. From an administrator account on testwiki, block yourself
  2. Go to https://test.wikipedia.org/wiki/Special:AbuseFilter/6

Filter 6 is marked private, but it's still visible.

This is a problem because one of the most common reasons for an admin to be blocked (at least on enwiki) is that the account is compromised. It often takes time to find a steward to lock the account, and we don't want people exploring the private filters during the gap.

Details

Risk Rating
Medium
Author Affiliation
Wikimedia Communities

Event Timeline

sbassett changed Author Affiliation from N/A to Wikimedia Communities.Nov 22 2021, 4:48 PM
sbassett changed Risk Rating from N/A to Medium.
sbassett added a project: Vuln-Authn/Session.
sbassett edited projects, added Vuln-MissingAuthz; removed Vuln-Authn/Session.

Seems reasonable. Code-wise, we need to change AbuseFilterPermissionManager::canViewPrivateFilters() to check user blocks, like ::canEdit() does (and the check in canEdit() should stay).

@sbassett Can this be made public? (or, if not, can you advise what to do about my public patch, which I created based on T320678...)

@sbassett Can this be made public? (or, if not, can you advise what to do about my public patch, which I created based on T320678...)

I mean, it was already disclosed in multiple ways, so yes. And it's likely low-risk enough that making it into production next week (the change set looks pretty close to mergeable) should be fairly low-risk.

sbassett changed the task status from Open to In Progress.Oct 14 2022, 12:47 AM
sbassett assigned this task to TheresNoTime.
sbassett triaged this task as Medium priority.
sbassett changed the visibility from "Custom Policy" to "Public (No Login Required)".
sbassett changed the edit policy from "Custom Policy" to "All Users".
sbassett removed a project: Security-Team.

Change 842009 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] AbuseFilterPermissionManager: Add sitewide block check

https://gerrit.wikimedia.org/r/842009