Skip to content

fix: protect against ssrf and subscription takeover - #17

Merged
albanm merged 2 commits into
mainfrom
fix-ssrf
Oct 8, 2026
Merged

albanm merged 2 commits into
mainfrom
fix-ssrf

Conversation

@albanm

@albanm albanm commented Oct 8, 2026

Copy link
Copy Markdown
Member

Upgrade lib-node 2.15 / lib-express 1.28.1: the default HTTP client now refuses non public addresses (loopback, private ranges, cloud metadata…).

  • Emails to the private directory URL go through the private client.
  • Web push: the endpoint is chosen by the user and the response was returned to them. web-push ignores the lib-node agents (not https.Agent instances), so it gets a plain agent with lib-node's publicLookup, and IP literals are checked before the call.
  • Webhook deliveries already used the default client and are now guarded too.
  • A subscription or webhook subscription posted with the _id of another user/account replaced it, it is now refused (403 / 404).
  • Dev environments allow the loopback with SSRF_PUBLIC_IPS=127.0.0.1,::1 (dev/init-env.sh).

Why: SSRF hardening across the data-fair stack, plus a subscription takeover found during the audit.

Heads-up: webhooks targeting private/intranet addresses now fail unless the address is listed in SSRF_PUBLIC_IPS (check existing subscriptions before deploying). Verify mails, web push and webhooks on staging.

albanm and others added 2 commits October 8, 2026 10:49
…sses

Upgrade lib-node 2.15 whose default agents refuse non public addresses.
The mails sent through the private directory url use the private client.
The web push endpoint is chosen by the user and its response was returned
to him: web-push ignores the lib-node agents (not instances of
https.Agent), so it gets a plain agent with the public lookup, IP literals
are checked before the call. Dev environments allow the loopback with
SSRF_PUBLIC_IPS.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Posting a subscription or a webhook subscription with the _id of another
user or account replaced it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the fix label Oct 8, 2026
@albanm
albanm merged commit 0378e36 into main Oct 8, 2026
3 of 4 checks passed
@albanm
albanm deleted the fix-ssrf branch October 8, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant