Summary
A vulnerability in the Grav Login plugin can expose password-reset usernames and bearer tokens through a publisher-controlled page at the reset route. If a victim opens a reset link while the crafted page is rendered, an attacker may obtain the token and use it to take over a more privileged account.
A vulnerability in the Grav Login plugin can expose password-reset usernames and bearer tokens through a publisher-controlled page at the reset route. If a victim opens a reset link while the crafted page is rendered, an attacker may obtain the token and use it to take over a more privileged account.
Affected context
The issue affects Grav sites using the Login plugin in versions where a publisher can author content at the password-reset route and the reset-link workflow renders that content through the plugin's page-handling logic. Exploitation depends on a victim opening an emailed password-reset link and the resulting page exposing sensitive reset information.
The issue affects Grav sites using the Login plugin in versions where a publisher can author content at the password-reset route and the reset-link workflow renders that content through the plugin's page-handling logic. Exploitation depends on a victim opening an emailed password-reset link and the resulting page exposing sensitive reset information.
Exploit preconditions
- Attack surface: The Grav Login password-reset route and its page-rendering behavior
- Required access: Publisher-level ability to author or control a page at the reset route
- Trigger point: A victim opens a password-reset link delivered by email
- Why exploitation is possible: The publisher-controlled page can expose the reset username and bearer token during rendering
- Additional condition: The exposed token must remain valid and correspond to an account with useful privileges
- Attack surface: The Grav Login password-reset route and its page-rendering behavior
- Required access: Publisher-level ability to author or control a page at the reset route
- Trigger point: A victim opens a password-reset link delivered by email
- Why exploitation is possible: The publisher-controlled page can expose the reset username and bearer token during rendering
- Additional condition: The exposed token must remain valid and correspond to an account with useful privileges
Why this happens
The underlying flaw is an information exposure caused by insufficient separation between publisher-controlled page content and sensitive password-reset workflow data. When Login::getPage() renders a page at the reset route, reset identifiers and bearer credentials can become available to content controlled by a lower-privileged publisher. This maps to CWE-200 because sensitive authentication data is disclosed to an unintended party, enabling subsequent account compromise.
The underlying flaw is an information exposure caused by insufficient separation between publisher-controlled page content and sensitive password-reset workflow data. When Login::getPage() renders a page at the reset route, reset identifiers and bearer credentials can become available to content controlled by a lower-privileged publisher. This maps to CWE-200 because sensitive authentication data is disclosed to an unintended party, enabling subsequent account compromise.
Potential impact
- An attacker may obtain password-reset bearer tokens.
- A victim's account could be taken over through unauthorized password resetting.
- Higher-privileged administrator or publisher accounts may be compromised.
- Attackers could modify site content, settings, or user access.
- Compromised accounts may be used for further attacks against the site.
- An attacker may obtain password-reset bearer tokens.
- A victim's account could be taken over through unauthorized password resetting.
- Higher-privileged administrator or publisher accounts may be compromised.
- Attackers could modify site content, settings, or user access.
- Compromised accounts may be used for further attacks against the site.
General mitigation guidance
Mitigation generally focuses on preventing publisher-controlled content from
accessing or rendering password-reset secrets.
Common defensive patterns include:
- Keeping reset tokens and usernames isolated from page content and template contexts.
- Applying strict route ownership and authorization checks before rendering reset pages.
- Using narrowly scoped, single-use, short-lived reset tokens with explicit account binding.
- Avoiding disclosure of bearer credentials in rendered responses, logs, or client-visible data.
- Separating password-reset workflow handlers from general page-rendering logic.
- Limiting publisher privileges and reviewing which roles can create or override routes.
- Invalidating exposed reset tokens and reviewing affected account activity as part of incident response.
Mitigation generally focuses on preventing publisher-controlled content from
accessing or rendering password-reset secrets.
Common defensive patterns include:
- Keeping reset tokens and usernames isolated from page content and template contexts.
- Applying strict route ownership and authorization checks before rendering reset pages.
- Using narrowly scoped, single-use, short-lived reset tokens with explicit account binding.
- Avoiding disclosure of bearer credentials in rendered responses, logs, or client-visible data.
- Separating password-reset workflow handlers from general page-rendering logic.
- Limiting publisher privileges and reviewing which roles can create or override routes.
- Invalidating exposed reset tokens and reviewing affected account activity as part of incident response.
How teams detect issues like this
Detection approaches may include:
- Static analysis for sensitive reset-token variables passed into templates or page-rendering functions.
- Code review checks for publisher-controlled routes overlapping with authentication workflows.
- Tests verifying that reset pages never expose tokens or unnecessary account identifiers.
- Dynamic checks that inspect reset responses for bearer tokens, credentials, or excessive user data.
- Policy enforcement preventing lower-privileged content authors from overriding security-sensitive routes.
- Automated security review tools can help identify data-flow paths from reset handlers to rendered output.
Detection approaches may include:
- Static analysis for sensitive reset-token variables passed into templates or page-rendering functions.
- Code review checks for publisher-controlled routes overlapping with authentication workflows.
- Tests verifying that reset pages never expose tokens or unnecessary account identifiers.
- Dynamic checks that inspect reset responses for bearer tokens, credentials, or excessive user data.
- Policy enforcement preventing lower-privileged content authors from overriding security-sensitive routes.
- Automated security review tools can help identify data-flow paths from reset handlers to rendered output.

