PST-083: No server-side ceiling on a multipart upload body before it is spooled to disk #812
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#812
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-083. 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/config/settings/base.py(692-734)Who can do it, and what they need. Any signed-in account (or an administrator for the 512 MB backup upload). No other precondition.
How it works.
upload.size > MAX_UPLOAD_BYTEScomparisons made in the form after the body has been fully received.Impact. Temporary disk and worker exhaustion by an authenticated user. The threat model lists denial of service against a personal instance as out of scope and defers to the reverse proxy's limits, which the wiki documents; recorded so the synthesis can say the application itself has no body ceiling.
Verification (verdict: confirmed; severity after verification: Informational). Precondition: none beyond reaching the site and having a CSRF cookie (any GET). It is not limited to signed-in accounts or administrators, because the CSRF middleware parses multipart before authentication. Still a plain denial-of-service concern that the threat model assigns to the reverse proxy. Remediation, if wanted: a small middleware that refuses requests whose Content-Length exceeds the largest legitimate upload (the 512 MB backup route needs a higher ceiling for administrators), and a deployment note on setting the proxy body limit, for example nginx client_max_body_size or Caddy request_body max_size.
Suggested remediation. Add a small middleware that refuses a request whose Content-Length exceeds the largest cap the instance accepts (backup limit for staff, 20 MB otherwise) with a 413 before the body is read, and repeat the client_max_body_size advice in the compose file comments.
Fixed in
445a16db9on main.