CORS configuration is possibly vulnerable
The Cross-Origin-Resource-Sharing policy in Open Zaak is currently wide open - every client is allowed.
This allows evil.com to run scripts that perform AJAX calls to known Open Zaak installations, and the browser will not block these. This was intended to only apply to development machines running on localhost/127.0.0.1.
Open Zaak 1.3.3 disables CORS by default, while it can be opted-in through environment variables.
The vulnerability does not actually seem exploitable because:
- The session cookie has a
Same-Site: Laxpolicy which prevents it from being sent along in Cross-Origin requests
- All pages that give access to (production) data are login-protected
Access-Control-Allow-Credentialsis set to
- CSRF checks probably block the remote origin, since they're not explicitly added to the trusted allowlist.
- MDN on CORS: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
- library used: https://pypi.org/project/django-cors-headers/
For more information
If you have any questions or comments about this advisory:
- Open an issue in Open Zaak