| عنوان | 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) |
|---|
| ارسال | 09/11/2026 08:37 AM (22 أيام منذ) |
|---|
| الاعتدال | 30/11/2026 04:17 PM (21 days later) |
|---|
| الحالة | تمت الموافقة |
|---|
| إدخال VulDB | 445706 [Dromara Jpom حتى 2.11.14 Server Index Controller IndexControl.java toIndex البرمجة عبر المواقع] |
|---|
| النقاط | 19 |
|---|