Skip to content

X-Forwarded-Host / Forwarded header spoofing enables URL rewrite hijack #409

Closed

Description

@aram356

Summary

RequestInfo trusts Forwarded, X-Forwarded-Host, and X-Forwarded-Proto headers without validation against trusted proxies. An attacker setting X-Forwarded-Host: evil.com causes the HTML rewriter to replace all origin URLs with evil.com.

Refs

  • crates/common/src/http_util.rs lines 55-75 — extract_request_host trusts forwarded headers

Recommendation

Strip or validate forwarded headers at the Fastly VCL layer, or validate against a configured allowlist.

Context

Production readiness audit — see #396

Activity

  1. added theissue type on Mar 4, 2026
  2. added a commit that references this issue on Mar 17, 2026
    3d8330f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions