Skip to content

feat(security): harden the HTTP transport against SSRF and unsafe redirects - #143

Merged
Ayinkx01 merged 1 commit into
StellarFoundry:mainfrom
arike-tech:fix/ssrf-transport-hardening
Oct 28, 2026
Merged

Ayinkx01 merged 1 commit into
StellarFoundry:mainfrom
arike-tech:fix/ssrf-transport-hardening

Conversation

@arike-tech

Copy link
Copy Markdown
Contributor

Closes #21

Summary

  • Reject private, link-local, loopback, unspecified, multicast, broadcast, CGNAT, and IPv4-mapped address literals for remote endpoints.
  • Install a guarded DNS resolver so hostnames resolving to internal addresses are refused before connecting.
  • Allow only redirects to the original endpoint host, re-validating every hop and the final response URL.
  • Document the fail-closed policy in docs/NETWORK_SECURITY.md and update related security/architecture docs.

Tests

  • cargo test --workspace --all-features passed.
  • cargo clippy -p devkit-rpc --all-targets --all-features -- -D warnings passed.
  • Added unit tests for private-range rejection, DNS filtering, same-host redirects, and cross-host redirect refusal.

Security notes

Cross-host redirects now fail closed instead of being silently followed. Loopback endpoints remain usable for local RPC nodes.

Reject private/link-local address literals, filter resolved DNS addresses, allow only re-validated same-host redirects, and re-check the final response URL. Document the network security policy.
@arike-tech
arike-tech requested a review from Ayinkx01 as a code owner October 28, 2026 16:26
@Ayinkx01
Ayinkx01 merged commit bd02577 into StellarFoundry:main Oct 28, 2026
6 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.

feat(security): harden the HTTP transport against SSRF and unsafe redirects

2 participants