PST-012: Accounts with no password or second factor pass reauthentication automatically, so a hijacked SSO-only session can delete the account #741
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#741
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-012. 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/accounts/views.py(495-507)Who can do it, and what they need. Someone holding an unattended or stolen session of an account created through single sign-on that never set a password or a passkey.
How it works.
Impact. Narrow: needs a live session of an SSO-only account; the deletion is at least loud (everything is removed) and the MFA enrolment is visible under Settings → Account.
Evidence.
Verification (verdict: confirmed; severity after verification: Low; first-pass claim: Informational). Attacker: someone holding a live session of a passwordless, MFA-less account (typically SSO-only), such as an unattended unlocked machine. Gain: delete the account with only the visible address typed, set a password or enrol an authenticator for persistence, and, if the account is an administrator's, download or delete backups (all users' data) with no proof. Remediation: for accounts with no reauthentication flow, require something Postulo can check itself (for example a mailed code or a fresh SSO round-trip) before delete, MFA enrolment, set-password and backup download, and correct the DeleteAccountView docstring. Cited lines views.py:495-507 and allauth reauthentication.py:76-83 are correct.
Suggested remediation. For accounts with no local reauthentication method, require a fresh provider round trip (allauth's reauthenticate via socialaccount) or an emailed code before destructive settings; or nudge SSO-only accounts to add a passkey.
Fixed in
85b38f408on main.