PST-011: Administrator recovery links, demotion and account deletion need no fresh proof, and taking over a member's account is silent #740
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#740
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-011. Severity: Low.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-392; 344-392; 344-411)Who can do it, and what they need. Anyone with physical or remote access to an administrator's browser session that was left signed in (shared screen, stolen session cookie).
How it works.
Impact. A hijacked or unattended administrator session can take over, delete or promote accounts without proving who is at the keyboard, while the project already recognised this risk for backups and gated those actions.
Evidence.
Verification (verdict: confirmed; severity after verification: Low). File/lines correct; add PersonUsernameView (server_views.py:414) and PersonActiveView (:261) to the ungated set. Precondition sharpened: the attacker must drive the administrator's own browser session (unattended screen or an exfiltrated Secure/HttpOnly cookie), a scenario the threat model largely places out of scope, which is why this stays low rather than medium. The inconsistency with backups and self-deletion, which the project already gates, is the substance of the finding; the fix is the same @method_decorator(reauthentication_required) on the POST handlers of the People actions, at least recovery and delete.
Suggested remediation. Decorate PersonRecoveryView.post, PersonDeleteView.post and PersonAdminView.post with allauth's reauthentication_required (as views_backups does), and extend tests/security/test_staff_only.py or test_backups_page.py to assert the redirect to reauthentication for an administrator without a recent authentication.
Also covered by this issue.
src/postulo/core/server_views.py(344-392); Informational). The threat model's promise that 'Server settings shows administrators accounts, never anyone's applications or documents' holds for the pages but not for the account: an administrator can become any member in two requests, with no notification to the member and no recent-authentication check, so a …src/postulo/core/server_views.py(344-411); Informational). Horizontal takeover among administrators and vertical over members, which the threat model accepts ('An administrator is still trusted with the instance ... appoint only people you would trust with the database'). …Fixed in
634ac0d04on main.