SEC2-036: POSTULO_BACKUP_DOWNLOAD falls open to "every administrator" on any value it does not recognise, and no start-up check reads it #978
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#978
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 on 2026-10-16 in a read-only security review of
postuloat56fc9d531, checked by a second, independent pass.Severity: Low · Category: Configuration · Reference: CWE-636 (Not Failing Securely); OWASP A05:2021 (Security Misconfiguration)
Location:
src/postulo/core/views_backups.py:75-82(may_download)src/postulo/core/checks.py:28-34(CHOICEShas no entry for it)Issue
operators,superuser,none,offor a trailing character all reach the last line and grant the widest rule. Every other fixed-vocabulary setting (POSTULO_EMAIL_SECURITY,POSTULO_PDF_BACKEND,POSTULO_LOG_FORMAT,POSTULO_MAP_TILES) is refused at start-up throughchecks.CHOICES; this one, which #810 added as the operator's way to narrow who may carry the whole database away, is not in the list.Impact
An operator who typed the setting to restrict backup downloads to themselves or to the console believes it is restricted while every administrator can still download an archive holding every account's rows and files. The misconfiguration is silent:
check --deploypasses and the Backups page shows the button.Fix
Add
"POSTULO_BACKUP_DOWNLOAD": ("administrators", "operator", "console")tochecks.CHOICES(the check compares the raw value, soOperatoris refused at start-up asStarttlswould be, consistent with the other entries), and makemay_downloadfail closed, which still matters for a setting changed at runtime:Done when:
tests/test_hardening_810.pyassertspostulo.E001forPOSTULO_BACKUP_DOWNLOAD="operators"and a 404 on download for an administrator under that value.Related
#810 (closed) - introduced the setting; nothing about unknown values. #487 (closed) - the same class of start-up check for the OAuth settings.