This module has an Access Bypass / Enumeration vulnerability. - But it was decided that this can be solved in public as of https://www.drupal.org/psa-2023-07-12
The route access checks for Flag's action routes (_flag_access / _unflag_access → FlagAccessCheck, UnFlagAccessCheck) only call FlagInterface::actionAccess(). That method checks Flag's own permissions (flag <id>, unflag <id>, own/other items, hook_flag_action_access()), but never checks whether the user may view the flagged entity.
Any user with permission to use a flag can therefore flag or unflag any entity of the flag's type by ID, including unpublished nodes, other users' private content, and entities hidden by node access modules (node_access grants, Group, etc.).
AI disclaimer
AI was used to find and fix this issue.
| Comment | File | Size | Author |
|---|
Issue fork flag-3638525
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
anybodyComment #3
anybodyComment #5
anybodyComment #6
anybodyComment #7
anybodyComment #8
grevil commented