Skip to content

fix: prevent privilege escalation by non-superusers in the user admin - #595

Merged
tdruez merged 4 commits into
mainfrom
266-user-admin-privilege-escalation
Oct 9, 2026
Merged

tdruez merged 4 commits into
mainfrom
266-user-admin-privilege-escalation

Conversation

@tdruez

@tdruez tdruez commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Issues

Changes

  • Restrict viewing, changing, and disabling users in the admin to superusers
  • Allow non-superusers with the add permission to create users
  • Make the superuser status read-only on user creation by a non-superuser
  • Limit the assignable groups on user creation to the non-superuser's own groups
  • Add tests covering user management restrictions and user creation by a non-superuser

tdruez added 4 commits October 8, 2026 13:41
…d their own

Signed-off-by: tdruez <tdruez@aboutcode.org>
…ation

Signed-off-by: tdruez <tdruez@aboutcode.org>
Signed-off-by: tdruez <tdruez@aboutcode.org>
@tdruez
tdruez merged commit 8049c00 into main Oct 9, 2026
8 checks passed
@tdruez
tdruez deleted the 266-user-admin-privilege-escalation branch October 9, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: User in legal group and with staff status is effectively a superuser

1 participant