/

CVE-2026-32616

Severity:

HIGH RISK

(8.2)

Host Header Injection in Pigeon Email Verification URLs

CVE-2026-32616

Deferred

Vulnerability type

Category:

Host Header Injection

CWE:

CWE-74

Impact:

Account Takeover via Malicious Verification URLs

Severity:

HIGH RISK

(8.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Pigeon's registration and email verification flows construct verification URLs using the HTTP Host header without validation, allowing an attacker to inject a malicious domain into verification links.

If a victim follows a verification email that points to an attacker-controlled domain, the attacker can steal the verification token and potentially take over the victim's account.

Affected context

This vulnerability appears in Pigeon deployments that:

  • Build absolute email verification URLs using $_SERVER['HTTP_HOST'] (or equivalent host data) directly
  • Do not validate or canonicalize the Host header against an expected application domain
  • Send these URLs to users during registration or when resending verification mail

It is most relevant where the application is reachable through untrusted networks or via reverse proxies that forward user-controlled Host headers.

Exploit preconditions

  • Attack surface: Public web endpoints handling registration and email verification (e.g., /register, /resendmail)
  • Required access: Ability to send crafted HTTP requests with a manipulated Host header; no prior authentication is typically required
  • Trigger point: The moment the application constructs an absolute email verification link using $_SERVER['HTTP_HOST'] and sends it to the user's email address
  • Why exploitation is possible: The application treats the Host header as a trusted source of canonical domain information, without validation or restriction, enabling an attacker to inject an arbitrary domain into application-generated links.

Why this happens

The root cause is unvalidated use of the HTTP Host header to construct security-sensitive URLs, such as email verification links.

By directly interpolating $_SERVER['HTTP_HOST'] into the URL template, the application allows user-controlled data to influence the structure and destination of generated links.

This maps to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component, where downstream components (email clients, browsers, and the verification endpoint) consume attacker-influenced URLs.

The bug is conceptual: the server implicitly trusts an input channel (Host header) that is meant for routing, not for constructing authoritative URLs, creating an injection point for phishing and token theft.

Potential impact

  • Users may be redirected to attacker-controlled domains when clicking verification links.
  • Attackers could capture email verification tokens and use them to complete registration flows on behalf of victims.
  • Successful exploitation can lead to account takeover, especially for newly registered accounts.
  • Users' trust in application emails and domains can be undermined, enabling broader phishing and social engineering.
  • In multi-tenant or proxied environments, misrouting of verification flows and logging confusion can occur.

General mitigation guidance

Effective mitigation involves decoupling security-sensitive URL construction from user-controlled headers and enforcing strict domain validation:

  • Use a configured, canonical application base URL (from environment variables or configuration files) instead of $_SERVER['HTTP_HOST'] when generating absolute links.
  • Enforce whitelisting or exact matching of the effective host against known, allowed domains if host information must be derived from the request.
  • Centralize URL generation in a helper routine that always uses trusted configuration and cannot be influenced by the incoming Host header.
  • Where reverse proxies or load balancers are involved, ensure clear trust boundaries and avoid passing raw Host headers directly into application logic.
  • Treat all request headers, including Host and X-Forwarded-* headers, as untrusted input and avoid using them in authentication, verification, or password reset flows without strong validation.

These patterns reduce the risk that attacker-controlled headers can affect verification, reset, or sign-in links.

How teams detect issues like this

Detection can focus on both code-level signals and runtime behavior:

  • Static analysis patterns:
  • Flag uses of $_SERVER['HTTP_HOST'], Host header, or framework-specific host accessors in code paths that generate absolute URLs for verification, password reset, or login links.
  • Identify URL-building utilities that concatenate raw request header values into links sent via email or other out-of-band channels.
  • Code review signals:
  • Look for direct string concatenation or templating where the host portion of a URL is not sourced from configuration.
  • Review registration, verification, and password reset handlers for assumptions that the Host header is trustworthy.
  • Check for missing domain whitelisting or validation in functions that depend on the notion of "site URL" or "base URL".
  • Policy and automated enforcement:
  • Establish guidelines that mandate a single, configuration-driven base URL for all security-related links.
  • Use automated code-scanning tools or linters to flag reliance on request headers for canonical URLs.
  • Log suspicious patterns such as frequent requests with mismatched Host headers and monitor them to identify potential exploitation attempts.

Sources

SourceLink
github.comgithub.com/kasuganosoras/Pigeon/releases/tag/1.0.201
github.comgithub.com/kasuganosoras/Pigeon/security/advisories/GHSA-rrj4-9wgq-prcr

Frequently asked

questions

Yes. An attacker can exploit it remotely by sending crafted HTTP requests with a manipulated Host header and then causing victims to use the resulting verification emails.

Typically no. The attacker only needs access to the public registration or resend verification endpoints and the ability to control the Host header in their requests.

Use a fixed, configuration-driven base URL for all verification and password reset links, and remove any dependence on the Host header or other user-controlled headers when constructing these URLs.

Define a clear policy that all security-sensitive URLs (verification, reset, login links) must be built from trusted configuration, treat headers as untrusted input, and include automated checks in code review and CI pipelines to detect host-based URL construction patterns.

Find out what's already
exploitable in your codebase.