提交 #1082223: dromara Jpom (server console, tag `v2.11.12`) `v2.11.12` (audited at tag `v2.11.12`, codeload 2026-10-04, official source build, JDK 11; the built artifact bundles `BOOT-INF/classes/dist/index.html` — confirmed by archive listing — so the served Refl信息

标题dromara Jpom (server console, tag `v2.11.12`) `v2.11.12` (audited at tag `v2.11.12`, codeload 2026-10-04, official source build, JDK 11; the built artifact bundles `BOOT-INF/classes/dist/index.html` — confirmed by archive listing — so the served Refl
描述Reflected cross-site scripting via the Jpom-ProxyPath request header on the anonymous index route of Jpom Vendor: dromara Affected versions: `v2.11.12` (audited at tag `v2.11.12`, codeload 2026-10-04, official source build, JDK 11; the built artifact bundles `BOOT-INF/classes/dist/index.html` — confirmed by archive listing — so the served template face is the official `web-vue/index.html` template) Vulnerability class: Reflected cross-site scripting (CWE-79) Preconditions: none on the server side — the route is anonymous (`@NotLogin`). For the victim: the crafted request must carry the custom `Jpom-ProxyPath` header, so exploitation requires a same-origin fetch/XHR attaching the custom header, an on-path or same-network proxy that forwards it, or an upstream reverse proxy configured to pass it. The login-exempt console index route reads the `Jpom-ProxyPath` request header and splices it raw into the served bootstrap page at a placeholder that sits inside a single-quoted JavaScript string literal, so a quote-bearing header value executes as JavaScript in the console origin when the page loads. Data flow: request header `Jpom-ProxyPath` at `GET /` (anonymous, `@NotLogin`) → `IndexControl.java:128` `UrlRedirectUtil.getHeaderProxyPath(request, ServerConst.PROXY_PATH)` → `UrlRedirectUtil.java:110-136` (only transformation: `FileUtil.normalize(contextPath + "/" + proxyPath)` + trailing-slash trim; no HTML/JS escaping, no character whitelist) → `IndexControl.java:129` `StrUtil.replace(html, "<routerBase>", proxyPath)` → `window.routerBase = '<routerBase>'` inside a `<script>` block of the served `dist/index.html` (`web-vue/index.html:121`). ### Affected interfaces | Interface | |---| | `GET /` with request header `Jpom-ProxyPath: <payload>` (anonymous, `@NotLogin`) | Primary route detail: ``` GET / Jpom-ProxyPath: x'+alert(document.domain)+' ``` The header value is a deployment hint (the console's base path behind a reverse proxy), i.e. data. `FileUtil.normalize` handles path separators and `..` segments only; quotes, angle brackets and semicolons pass through unchanged, so a single quote closes the JavaScript string literal and the remainder executes as JavaScript when the browser parses the page's script block. A second insertion of the same value at `IndexControl.java:131` targets the favicon `<link>` href attribute context (template-line dependent; the audited build's favicon line carries no literal placeholder, so the live sink is the JavaScript string context). This is a distinct vector from the reflected XSS on the sibling `/oauth2-{provide}` route of the same template (different route, different input channel — header vs path variable — and different insertion point). Baseline: tag `v2.11.12` official source build (server artifact from the official source tree, JDK 11), embedded H2, listening on `127.0.0.1:18775`; the startup log records `Tomcat started on port(s): 18775 (http)` and `Adding welcome page: class path resource [dist/index.html]`. All requests were sent with `curl --noproxy '*'`. **1. Working payload (string-concatenation form):** ```sh $ curl -s --noproxy '*' -H "Jpom-ProxyPath: x'+alert(document.domain)+'" http://127.0.0.1:18775/ # -> response line 121: window.routerBase = '/x'+alert(document.domain)+'' ``` Executing that reflected line in Node under alert/document stubs prints `fired: [ 'ALERT:127.0.0.1' ]` — a browser parsing this script block executes `alert(document.domain)` at page load with `document.domain` resolving to the console origin. **2. Payload-shape control (comment form does not execute in this build):** ```sh $ curl -s --noproxy '*' -H "Jpom-ProxyPath: x';alert(document.domain);//" http://127.0.0.1:18775/ # -> response line 121: window.routerBase = '/x';alert(document.domain);' ``` `FileUtil.normalize` folds the `//` and the trailing slash is trimmed, leaving a hanging quote — this form is a SyntaxError and does not execute; the string-concatenation form is the working shape. **3. Attribute-context reflection probe:** ```sh $ curl -s --noproxy '*' -H 'Jpom-ProxyPath: "><svg onload=alert(1)>' http://127.0.0.1:18775/ # -> response line 121: window.routerBase = '/"><svg onload=alert(1)>' ``` Quotes and angle brackets pass the normalization untouched. **4. Negative controls:** - No header: `window.routerBase = ''` — empty baseline, no injection. - Benign value `Jpom-ProxyPath: console`: `window.routerBase = '/console'` — a legitimate path value renders normally. Only quote-bearing values break the JavaScript string context. All testing was performed against a self-hosted instance on the reporter's own host. No third-party system, production instance or customer data was involved. - **Vendor contact**: none available — the repository publishes no public security email and Private Vulnerability Reporting is unavailable (vendor contact channels are chat-based only); VulDB is the only available channel for this entry. - **Status**: not yet reported to the vendor; not publicly disclosed; no CVE assigned. - **Duplicate check**: public advisories (NVD/OSV/GitHub) and the project issue tracker were searched before reporting; the sibling `/oauth2-{provide}` path-variable reflection on the same template is a different route, input channel and insertion point; please tell us if this duplicates something already tracked internally.
来源⚠️ https://github.com/dromara/Jpom
用户
 lucasg2g (UID 84737)
提交2026-11-09 08時37分 (21 日前)
管理2026-11-30 16時17分 (21 days later)
状态已接受
VulDB条目445706 [Dromara Jpom 直到 2.11.14 Server Index Controller IndexControl.java toIndex 跨网站脚本]
积分19

Interested in the pricing of exploits?

See the underground prices here!