PST-063: Any administrator can strip the operator's superuser flag through People #792
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#792
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found in the security audit of 2026-10-10 (
SECURITY-AUDIT-2026-10-10.md), run againstmainatc30851bfrom 8 to 10 October 2026, as PST-063. Severity: Informational.The text below is the audit's entry, unchanged apart from links to the other issues it names. The finding was produced by automated review and checked by a second automated pass; re-check it before acting on it.
src/postulo/core/server_views.py(236-259)Who can do it, and what they need. A signed-in administrator (is_staff) who is not the operator; the operator must not be the last active administrator.
How it works.
Impact. A lower-privileged administrator can permanently remove the operator's superuser standing (the flag docs/THREAT-MODEL.md and admin_site.py reserve for 'the operator's own account'), locking the operator out of a mounted Django admin and out of every superuser-only path, and can do so before the operator notices. …
Verification (verdict: confirmed; severity after verification: Informational; first-pass claim: Low). Precondition unchanged (a second active staff administrator). Impact corrected: the is_superuser flag is read nowhere in Postulo and matters only for a Django admin the operator chose to mount; the demotion itself (is_staff) is a documented power every administrator has over every other. The loss is irreversibility from the UI, recoverable at the console (
manage.py shell/createsuperuser, as the #368 changelog entry already instructs). This is a deliberate choice tested in tests/test_server_settings.py:226-231, and the actor is one the threat model trusts, so it is an observation rather than a vulnerability.Suggested remediation. Refuse to demote an account that holds is_superuser from the People page unless the acting administrator is also a superuser (or leave is_superuser untouched when demoting, as the promotion path already leaves it alone), log the change with who did it, and add a test in tests/security/test_staff_only.py that a plain staff account cannot change another account's is_superuser.
Fixed in
9b7e0ce2don main.