Grav reset links must not inherit forged proxy schemes
Grav reset links must not inherit forged proxy schemes Password reset links combine a secret token with a host and scheme. CVE-2026-130748 shows what happens when a reverse proxy header is allowed to choose that scheme without a trusted-proxy policy. Grav 2.0.0 before 2.2.18, and earlier 1.x releases before 1.7.53.7, contain a password reset poisoning flaw. An anonymous attacker can forge the…
Grav password reset links should never inherit proxy schemes from forged headers. When a reverse proxy header is permitted to dictate the link's scheme without proper verification, a security flaw arises. Version 2.0.0 prior to 2.2.18, and earlier 1.x releases before 1.7.53.7, are vulnerable to this issue. An attacker can manipulate the CloudFront-Forwarded-Proto header during a password reset request.
This manipulation allows the attacker's host to appear in the email link, potentially exposing the reset token, even to super administrators. The severity of this vulnerability is high, as it involves confidentiality without requiring any privileges. The attack hinges on the proxy accepting the header and the victim using the generated link, both common in content sites behind CDNs.
To mitigate this risk, administrators must upgrade to Grav 2.2.18 or 1.7.53.7. Additionally, they should inspect which proxy headers reach PHP, ensuring a network boundary strips client-supplied forwarding headers. Reset URLs should be built from a pre-configured, unchangeable base URL rather than from request-controlled scheme or host data.
If the application supports multiple domains, the tenant should be resolved through an authenticated application setting or an allowlisted Host value. Never rely on Forwarded, X-Forwarded-, or CDN-specific headers unless the immediate peer is a trusted proxy.
For testing purposes, security teams can simulate the attack by sending a reset request through the regular edge, adding an unexpected forwarded scheme, and checking if the mail template's origin changes. This should be repeated with a direct origin connection to confirm that untrusted forwarding headers are refused. After identifying a potential poisoning event, it is crucial to invalidate any outstanding reset tokens for affected users and review mail delivery logs for any unusual link origins.
If an administrator has inadvertently followed a modified link, they should rotate higher-value credentials. While the application fix prevents new links from inheriting the forged origin, it cannot recover tokens already delivered to an attacker.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to