/

CVE-2026-45013

Severity:

HIGH RISK

(8.1)

Host Header Abuse (CWE-640) in ApostropheCMS Reset

CVE-2026-45013

Deferred

Vulnerability type

Category:

Account Recovery Abuse / Credential Reset Weakness

CWE:

CWE-20, CWE-640

Impact:

Account Takeover

Severity:

HIGH RISK

(8.1)

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

ApostropheCMS builds password reset URLs using the request hostname, which can be controlled via the HTTP Host header when the base URL is not explicitly configured.

An attacker who knows a victim's email address can trigger a password reset email that sends a valid reset link to an attacker-controlled domain, enabling interception of the reset token and full account takeover if the victim follows the link.

Affected context

This vulnerability occurs in ApostropheCMS deployments where the apos.baseUrl configuration is not explicitly set and the application implicitly trusts req.hostname derived from the HTTP Host header.

It is most relevant in environments where password reset emails are enabled and deliver clickable links to end users, and where perimeter infrastructure does not normalize or restrict the Host header to expected values.

The risk increases in multi-tenant, reverse-proxy, or cloud environments where crafted Host headers are more likely to pass through to the application layer.

Exploit preconditions

  • Attack surface: Public-facing password reset endpoint of an ApostropheCMS site.
  • Required access: Unauthenticated network access to the application and knowledge of the victim's email address.
  • Trigger point: Submission of a password reset request using the victim's email while sending a crafted HTTP Host header that points to an attacker-controlled domain.
  • Why exploitation is possible: The application constructs the reset URL using req.hostname without validating or canonicalizing it against a trusted base URL, allowing the attacker to influence the destination of the emailed reset link while still generating a valid reset token.

Why this happens

The underlying bug is a trust boundary violation in how the application derives externally visible URLs for sensitive flows.

Instead of using a canonical, server-side configuration value (such as a fixed base URL), the implementation relies on req.hostname, which is populated directly from the HTTP Host header.

This creates an input validation flaw (CWE-20) and a credential recovery misuse (CWE-640), because a security-sensitive token is embedded into a URL whose domain is attacker-controlled.

Abstractly, the insecure pattern is: constructing account recovery links from untrusted request metadata rather than from a validated, application-controlled origin.

Potential impact

  • Full account takeover of affected user accounts if victims click attacker-domain reset links.
  • Unauthorized access to user data, content, or administrative capabilities within ApostropheCMS.
  • Lateral movement to related systems or services that share credentials or trust the compromised account.
  • Phishing amplification, as attacker-hosted reset pages can be combined with other deceptive content.

General mitigation guidance

Effective mitigation focuses on removing trust in client-supplied host information for security-sensitive URLs and hardening account recovery flows:

  • Prefer a fixed, server-side configuration for the canonical external URL (e.g., a base URL setting) and use it for all absolute links in emails, including password resets.
  • Validate and normalize host-related inputs against an allowlist of expected domains when such inputs are unavoidable, rejecting or ignoring mismatches.
  • Design recovery flows so that tokens are bound to the correct origin and cannot be meaningfully used if delivered to another domain.
  • Limit the power of reset tokens (short lifetimes, one-time use) and require additional verification steps for high-privilege accounts.
  • Employ defense-in-depth at the infrastructure layer by constraining acceptable Host headers at the reverse proxy or load balancer.

How teams detect issues like this

Detection commonly relies on a combination of code and configuration review:

  • Examine password reset and email generation logic for use of req.hostname, Host headers, or other request-derived values when building absolute URLs.
  • Use static analysis or linting rules that flag host or URL construction from untrusted headers in security-sensitive contexts (authentication, password reset, email verification).
  • Review configuration management to ensure a canonical base URL is defined and consumed consistently across the application.
  • Perform security testing that sends crafted Host headers to identify whether reset or verification links in emails reflect attacker-controlled domains.
  • Incorporate automated checks in CI/CD that search for direct usage of host headers without validation in URL construction.

Sources

SourceLink
github.comgithub.com/apostrophecms/apostrophe/security/advisories/GHSA-gf43-24g3-5hw2

Frequently asked

questions

Yes. It can be exploited remotely by anyone with network access to the application's password reset endpoint and knowledge of the victim's email address.

No authentication is required, and the attacker does not need special network positioning. The attack works over standard HTTP/HTTPS as long as the attacker can send requests with a crafted Host header that reach the application.

The most robust fix is to always construct password reset and other security-sensitive URLs from a trusted, application-controlled base URL (a canonical configuration value), never from Host or other request headers, and to ensure that recovery tokens are only valid for that origin.

Establish a design rule that client-controlled headers (like Host, X-Forwarded-Host, and related fields) are never used directly in security-sensitive operations, enforce this rule through code review and static checks, and consistently rely on validated configuration values for external URLs and account recovery flows.

Find out what's already
exploitable in your codebase.