You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The server uses the Origin value from the request headers as the email link baseUrl without validation. If an attacker controls the Origin, password reset / email verification links in emails can be generated pointing to the attacker’s domain, causing authentication tokens to be exposed and potentially leading to account takeover.
Details
The core of the vulnerability is that two endpoints use the request Origin header as the baseUrl without validation.
In the same way, it uses ResendEmailVerificationDTO.setBaseUrl(originHeader) to include the Origin value when generating the link.
PoC
If an attacker sets the Origin to their own domain and sends a password reset request, the link generated in the email will point to the attacker’s domain, potentially exposing the token.
Reproduction Steps
The attacker sends a password reset request for the victim’s email. The request header’s Origin value is set to the attacker’s domain (e.g., https://36fab03272ba.ngrok-free.app).
The server uses the received Origin as the baseUrl to generate the link included in the email. Example: https://36fab03272ba.ngrok-free.app/user/resetPassword?token=...
When the victim clicks the link in the email, the request is sent to the attacker’s domain, and the token is exposed.
The attacker uses the leaked token to reset the password and gain access to the account.
poc.mp4
Impact
Account Takeover: If an attacker obtains the token from the email link, they can log in to the victim’s account or change the password.
Personal Information Exposure: User email addresses and account-related information may be exposed to third parties.
Phishing / Malicious Redirection: Legitimate emails can be used to lure users to an attacker-controlled site, enabling further malicious actions (e.g., credential theft).
Service Trust and Compliance Risks: If email links point to external domains, user trust may decrease, and legal or compliance issues may arise.
Summary
The server uses the
Originvalue from the request headers as the email linkbaseUrlwithout validation. If an attacker controls theOrigin, password reset / email verification links in emails can be generated pointing to the attacker’s domain, causing authentication tokens to be exposed and potentially leading to account takeover.Details
The core of the vulnerability is that two endpoints use the request
Originheader as thebaseUrlwithout validation.Vulnerable code
/forgotPasswordhttps://github.com/appsmithorg/appsmith/blob/release/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/UserControllerCE.java#L90-L100
The
/forgotPasswordAPI uses theOriginvalue provided by the client as the email linkbaseUrlwithout validation./resendEmailVerificationhttps://github.com/appsmithorg/appsmith/blob/release/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/UserControllerCE.java#L189-L196
In the same way, it uses
ResendEmailVerificationDTO.setBaseUrl(originHeader)to include theOriginvalue when generating the link.PoC
If an attacker sets the
Originto their own domain and sends a password reset request, the link generated in the email will point to the attacker’s domain, potentially exposing the token.Reproduction Steps
Originvalue is set to the attacker’s domain (e.g.,https://36fab03272ba.ngrok-free.app).Originas thebaseUrlto generate the link included in the email. Example:https://36fab03272ba.ngrok-free.app/user/resetPassword?token=...poc.mp4
Impact