Summary
LinkAce's password reset feature trusted user-controlled HTTP headers when generating reset URLs, allowing attackers to inject their own domain into the link sent by email.
If a victim clicks a poisoned reset link, the password reset token can be leaked to the attacker's server, enabling full account takeover.
Affected context
This vulnerability affects LinkAce instances that:
- Are deployed behind proxies or load balancers that set
X-Forwarded-*headers - Construct absolute URLs for password reset links based on inbound HTTP headers
- Do not enforce a strict, server-side canonical application host when generating emails
In such setups, user-controlled or proxy-injected headers can directly influence the host portion of password reset URLs.
Exploit preconditions
- Attack surface: Public-facing password reset endpoint of the LinkAce application.
- Required access: Ability to trigger a password reset for a target email address (often unauthenticated and public).
- Manipulable input: Control over
X-Forwarded-Host(or equivalent) header in the password reset HTTP request. - Application behavior: The application reflects the header value into the absolute URL used in password reset emails without strict validation.
- Victim action: The victim must click the received reset link, causing their browser to contact the attacker-controlled domain and expose the token.
Why this happens
The core issue is improper trust in client-supplied or proxy-propagated host headers when building security-critical URLs.
Instead of relying on a server-side canonical base URL, the application uses X-Forwarded-Host directly to construct password reset links.
This maps to CWE-601: Open Redirect, extended here to host header poisoning where attacker-controlled host values are embedded into redirects or links.
The abstract pattern is: unvalidated, user-influenced header values are used as part of a security-sensitive URL, allowing redirection or token leakage to attacker domains.
Potential impact
- Full account takeover by capturing password reset tokens.
- Unauthorized access to user data stored within the compromised LinkAce account.
- Lateral movement if compromised accounts share passwords with other services.
- Phishing and social engineering campaigns leveraging legitimate-looking reset emails.
- Erosion of user trust in system-generated security emails.
General mitigation guidance
Effective mitigation focuses on eliminating trust in user-controlled host information for security-sensitive URLs:
- Define and use a canonical application base URL from server-side configuration or environment, never from HTTP headers.
- When reverse proxies are required, whitelist and validate any forwarded host or proto headers against expected values before use.
- Treat
Host,X-Forwarded-Host, and similar headers as untrusted input; do not embed them directly into application-generated links. - For password reset and other tokenized URLs, always:
- Generate absolute URLs from trusted configuration.
- Ensure tokens are single-use, short-lived, and bound to the correct application context.
- Apply defense-in-depth by:
- Enforcing HTTPS and HSTS to make downgrade or interception harder.
- Logging anomalous host header usage for review.
How teams detect issues like this
Detection typically combines code-centric analysis with behavior monitoring:
- Static analysis / code scanning:
- Search for usages of
Host,X-Forwarded-Host, or similar headers in URL construction code. - Flag patterns where framework helpers infer full URLs from request objects for security emails or redirects.
- Code review practices:
- Review password reset and email generation flows to confirm they use a configured base URL, not request headers.
- Pay attention to middleware that normalizes proxy headers and how downstream code trusts those values.
- Runtime monitoring and logging:
- Log and alert on unusual or unrecognized host values hitting password reset endpoints.
- Correlate host header anomalies with email sending events for potential poisoning attempts.
- Automated SAST or security code review tools can be configured with rules to highlight any header-derived host usage in link generation.

