PST-086: OpenID Connect discovery, token and userinfo requests bypass the guarded client and its destination policy #815
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#815
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-086. 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(302-334)Who can do it, and what they need. Nobody today: POSTULO_OIDC_SERVER_URL comes only from the environment, which the threat model places with the operator. Recorded because rule 5 of the threat model says every outbound request goes through postulo.plugins.http.client(), and these do not.
How it works.
<server_url>/.well-known/openid-configuration, the token endpoint and the userinfo endpoint throughallauth.socialaccount.adapter.get_requests_session()(therequestslibrary), with allauth's own timeouts, redirect following and no address policy.Impact. None with a trustworthy provider; the operator chose it. If the discovery document is ever read from a less trusted source, or if a future change lets an administrator set the server URL from the Server settings page (as the mail host moved there in #149), the request path would have no guard.
Verification (verdict: confirmed; severity after verification: Informational). Attacker model: none under the threat model (operator environment variable and operator-chosen provider). A hardening option is a SocialAccountAdapter.get_requests_session override that applies the destination policy and honours POSTULO_CONNECTIONS_ALLOW_PRIVATE, or a documented exception in the threat model for the identity provider.
Suggested remediation. Document the exception in docs/THREAT-MODEL.md and the Hardening page (it already lists where the server dials); if the server URL ever becomes page-configurable, validate it with
check_destinationand consider overriding allauth's adapterget_requests_session/the OIDC client to route through the guarded client.Fixed in
91f995a94on main.