VYPR
High severityNVD Advisory· Published Jan 3, 2022· Updated Aug 3, 2024

Userfrosting - Host-Header Injection Leads to Account Takeover

CVE-2021-25994

Description

UserFrosting versions v0.3.1 to v4.6.2 are vulnerable to Host Header Injection allowing account takeover via the forgot password functionality.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

UserFrosting versions v0.3.1 to v4.6.2 are vulnerable to Host Header Injection allowing account takeover via the forgot password functionality.

Vulnerability

UserFrosting versions v0.3.1 through v4.6.2 are vulnerable to Host Header Injection [1]. The forgot password functionality does not properly validate the Host header, allowing an attacker to craft a malicious link that, when clicked by a victim, triggers a password reset request with an attacker-controlled host [1]. This affects the default configuration where site.uri.public is not explicitly set [3].

Exploitation

An unauthenticated attacker can exploit this by luring a victim application user to click on a specially crafted link [1]. The link directs the victim to the forgot password endpoint with a manipulated Host header. The application then sends a password reset email containing a reset link that points to the attacker-controlled host [1]. If the victim clicks the reset link, the attacker can intercept the request and reset the victim's password, gaining access to the account [1].

Impact

Successful exploitation allows the attacker to reset the victim's password and take over their account completely [1]. This results in full compromise of the victim's user account, including access to any data or functionality associated with that account within the UserFrosting application.

Mitigation

The vulnerability is fixed in commit 796dd78 [3], which adds a placeholder URL for site.uri.public in the configuration to guard against Host Header Injection by default in production. Users should upgrade to a version that includes this fix or apply the commit manually. As a workaround, administrators can explicitly set site.uri.public to the correct public URL in the configuration file [3]. No official release containing the fix has been announced as of the publication date [1].

AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
userfrosting/userfrostingPackagist
>= 0.3.1, < 4.6.34.6.3

Affected products

2

Patches

1
796dd7875790

Placeholder for `site.uri.public` in production

https://github.com/userfrosting/UserFrostingJordan MeleDec 12, 2021via ghsa
2 files changed · +8 0
  • app/sprinkles/core/config/production.php+3 0 modified
    @@ -52,6 +52,9 @@
                 'ajax' => false,
                 'info' => false,
             ],
    +        'uri' => [
    +            'public' => 'https://example.com',
    +        ],
         ],
         /*
          * Send errors to log
    
  • CHANGELOG.md+5 0 modified
    @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
     The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
     and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
     
    +## Unreleased
    +
    +### Security
    +- Added placeholder URL for `site.uri.public` in configuration to guard against Host Header Injection attacks by default in production.
    +
     ## [v4.6.2]
     
     ### Changes
    

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

4

News mentions

0

No linked articles in our index yet.