[Security] pingrelay: DNS rebinding bypass in forward_url validation #32

Closed
opened 2026-02-28 03:07:08 +00:00 by ash · 0 comments
Owner

Architectural Concern

pingrelay validates forward URLs at create time but DNS resolution happens at forward time. An attacker could:

  1. Set forward_url to https://attacker.com/hook (passes validation)
  2. Change DNS A record for attacker.com to 127.0.0.1
  3. Webhook forwarding now hits localhost

Recommendation

Use a custom DialContext in the HTTP client that resolves DNS and checks the IP against isBlockedIP() before connecting.

Severity

Medium — requires DNS control but well-known SSRF pattern.

Found during red team audit 2026-02-28.

## Architectural Concern pingrelay validates forward URLs at **create time** but DNS resolution happens at **forward time**. An attacker could: 1. Set forward_url to `https://attacker.com/hook` (passes validation) 2. Change DNS A record for attacker.com to `127.0.0.1` 3. Webhook forwarding now hits localhost ### Recommendation Use a custom `DialContext` in the HTTP client that resolves DNS and checks the IP against `isBlockedIP()` before connecting. ### Severity Medium — requires DNS control but well-known SSRF pattern. Found during red team audit 2026-02-28.
ash closed this issue 2026-03-26 16:38:24 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
ash/ideas#32
No description provided.