Fix auth bypass and SSRF vulnerabilities (v2.5.64)#36
Merged
ttlequals0 merged 3 commits intomainfrom Feb 21, 2026
Merged
Conversation
- Replace spoofable X-Internal-Request header with HMAC-validated X-Internal-Secret for scheduler-to-app authentication - Add validate_safe_url() with DNS resolution and private IP blocklist (RFC 1918, link-local, loopback, cloud metadata, IPv6 private) - Add create_safe_session() with redirect validation hook - Apply SSRF protection to healthcheck, webhook, and ntfy services - Fix ntfy config field name mismatch (server vs server_url) - Add 22 security tests covering auth bypass and SSRF scenarios
The auto-generated secret was unique per worker, causing 401s when the scheduler (in one worker) sent requests handled by a different worker. Now uses Redis SETNX to generate once and share across all workers and the celery container.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
X-Internal-Request: schedulerheader with HMAC-validatedX-Internal-Secretusing cryptographic shared secret (auto-generated at startup or set viaINTERNAL_API_SECRETenv var)validate_safe_url()with DNS resolution and private IP blocklist (RFC 1918, link-local, loopback, cloud metadata 169.254.x.x, IPv6 private), pluscreate_safe_session()with redirect validation hookserver_url(canonical) andserver(legacy) in notification provider config validationTest plan
tests/test_security_fixes.pycovering auth bypass and SSRF scenarioslinux/amd64)ttlequals0/pixelprobe:2.5.64andlatestcurl -H "X-Internal-Request: scheduler" .../api/versionreturns 401curl -H "X-Internal-Secret: <wrong>" .../api/versionreturns 401