Prevent Web Push endpoints from reaching private networks #653

Closed
opened 2026-08-12 13:24:13 +00:00 by timmy · 0 comments
Owner

Problem

Authenticated clients can persist arbitrary HTTPS Web Push endpoints. Delivery later sends server-side requests through pywebpush without rejecting private, loopback, link-local, reserved, credential-bearing, or DNS-rebound destinations. This creates a durable SSRF path.

Acceptance criteria

  • Reject non-canonical or non-public HTTPS endpoints before subscription persistence.
  • Re-resolve and validate the endpoint immediately before every delivery.
  • Remove an unsafe legacy subscription without contacting it while healthy public subscriptions continue.
  • Bound DNS validation and preserve existing push delivery behavior.
  • Add behavioral tests proving private addresses are never sent to.

Evidence

Current validation in src/main.py checks only the https:// shape; src/push_notifications.py passes the stored endpoint to pywebpush. Historical issue titles and recent commits contain no endpoint egress policy, private-network rejection, or DNS-rebinding work.

## Problem Authenticated clients can persist arbitrary HTTPS Web Push endpoints. Delivery later sends server-side requests through `pywebpush` without rejecting private, loopback, link-local, reserved, credential-bearing, or DNS-rebound destinations. This creates a durable SSRF path. ## Acceptance criteria - Reject non-canonical or non-public HTTPS endpoints before subscription persistence. - Re-resolve and validate the endpoint immediately before every delivery. - Remove an unsafe legacy subscription without contacting it while healthy public subscriptions continue. - Bound DNS validation and preserve existing push delivery behavior. - Add behavioral tests proving private addresses are never sent to. ## Evidence Current validation in `src/main.py` checks only the `https://` shape; `src/push_notifications.py` passes the stored endpoint to `pywebpush`. Historical issue titles and recent commits contain no endpoint egress policy, private-network rejection, or DNS-rebinding work.
timmy closed this issue 2026-08-12 13:32:33 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#653
No description provided.