Skip to content

fix: add SSRF protection to callback URL validation#96

Merged
user1303836 merged 1 commit intomainfrom
fix/callback-ssrf
Feb 18, 2026
Merged

fix: add SSRF protection to callback URL validation#96
user1303836 merged 1 commit intomainfrom
fix/callback-ssrf

Conversation

@user1303836
Copy link
Owner

Summary

  • Add is_private_ip() helper to detect loopback, private (10.x, 172.16.x, 192.168.x), link-local (169.254.x), broadcast, and unspecified IP addresses, plus IPv6 loopback/unspecified and the localhost hostname
  • Update validate_callback_url() to reject callback URLs targeting private/loopback addresses, preventing SSRF attacks
  • Add 5 new unit tests (test_validate_callback_url_loopback_rejected, test_validate_callback_url_localhost_rejected, test_validate_callback_url_private_ip_rejected, test_is_private_ip, test_ingest_with_loopback_callback_rejected) and update existing test

Addresses review feedback from PR #90.

Block private, loopback, link-local, broadcast, and unspecified IPs
in callback_url to prevent server-side request forgery. Also blocks
'localhost' hostname.
@user1303836 user1303836 merged commit ccf1e65 into main Feb 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant