Submeter #1082222: dromara Jpom (server console) `v2.11.12` — the `IndexControl` substitution and the `web-vue/index.html` placeholder line are in the official source tree at this tag Reflected cross-site scriptinginformação

Títulodromara Jpom (server console) `v2.11.12` — the `IndexControl` substitution and the `web-vue/index.html` placeholder line are in the official source tree at this tag Reflected cross-site scripting
DescriçãoReflected XSS in the anonymous /oauth2-{provide} console bootstrap route of Jpom Vendor: dromara Affected versions: `v2.11.12` — the `IndexControl` substitution and the `web-vue/index.html` placeholder line are in the official source tree at this tag Vulnerability class: Reflected cross-site scripting (CWE-79) Preconditions: None for the attacker — the route is anonymous (`@NotLogin`). The victim only needs to follow the crafted link (any browser renders the response as `text/html`). The anonymous Jpom console route `GET /oauth2-{provide}` reflects the raw path variable into a JavaScript string of the served HTML, so an attacker-crafted link executes attacker-supplied JavaScript in the Jpom origin of any victim who follows it. Data flow: URL path variable `{provide}` at `GET /oauth2-{provide}` (anonymous, `@NotLogin`, served as `text/html`) → `IndexControl.toIndex` (`IndexControl.java:103-140`) → `StrUtil.replace(html, "<oauth2Provide>", oauth2Provide)` (`IndexControl.java:133`, no HTML/JS escaping) → `window.oauth2Provide = '<oauth2Provide>'` placeholder inside a single-quoted JavaScript string (`web-vue/index.html:114`) → evaluated as JavaScript on page load. ### Affected interfaces | Interface | |---| | GET /oauth2-{provide} (anonymous bootstrap page, served as `text/html`) | | Same template line group (recorded, not counted): `Jpom-ProxyPath` request header reflected into `<routerBase>` via `UrlRedirectUtil.getHeaderProxyPath` (`FileUtil.normalize` only, no HTML escaping) — header-based, requires a cooperative request | Primary route detail: ``` GET /oauth2-x%27%2Balert(document.domain)%2B%27y ``` The route is exempt from login (`@NotLogin`, `IndexControl.java:106-110`) and serves the SPA bootstrap page `dist/index.html`. The substitution is a plain string replace with no HTML/JS escaping, so a URL-encoded `'` (`%27`) breaks out of the string literal and everything after it executes as JavaScript on page load. The `{provide}` value is data — it is meant to name a configured OAuth2 provider (e.g. `gitee`) — and the product never promises that it becomes executable script. ### Root cause 1. **Source.** `IndexControl.toIndex` (`modules/server/src/main/java/org/dromara/jpom/controller/IndexControl.java:103-140`) receives the `{provide}` path variable on the anonymous route (`:106-110`, `@NotLogin`) and reads `classpath:/dist/index.html`. 2. **Sink.** `:133` — `StrUtil.replace(html, "<oauth2Provide>", oauth2Provide)` with no HTML/JS escaping. In the template the placeholder sits inside a single-quoted JS string: `web-vue/index.html:114` — `window.oauth2Provide = '<oauth2Provide>'`. 3. **Breakout.** A URL-encoded `'` (`%27`) terminates the string literal; the following characters are evaluated as JavaScript on page load. Tomcat rejects `%2F` in path segments (an attempted `</script>` breakout 400s), but the quote breakout needs no slash and the crafted URL is fully linkable. 4. **Missing guard.** The provider name is meant to select one of the console's configured OAuth2 providers — a value from a small internal set — yet it is interpolated into an executable context (a JS string literal in served `text/html`) without escaping or validation against the configured provider registry. The product's own template design (a quoted string) shows the value was expected to be inert data; the missing escape lets it cross the data-to-script boundary on a pre-authentication page. Baseline: Jpom `v2.11.12`, official source build self-hosted on `127.0.0.1:2122`; the served bootstrap page is the release's `web-vue/index.html` template, its `<oauth2Provide>` placeholder line unmodified. **1. Executing-context reflection (JS string breakout):** ```sh $ curl -s -i 'http://127.0.0.1:2122/oauth2-x%27%2Balert(document.domain)%2B%27y' HTTP/1.1 200, Content-Type: text/html body contains: window.oauth2Provide = 'x'+alert(document.domain)+'y' ``` The string literal is closed at the injected `'` and `alert(document.domain)` is evaluated by the browser on page load. **2. Inert-string reflection control (HTML payload stays inside the quoted string):** ```sh $ curl -s -i 'http://127.0.0.1:2122/oauth2-%3Cimg%20src%3Dx%20onerror%3Dalert(1)%3E' HTTP/1.1 200, text/html; body contains: window.oauth2Provide = '<img src=x onerror=alert(1)>' ``` The raw HTML is reflected without any escaping — the quote breakout in step 1 is the executing form. **3. Negative control — benign provider value:** ```sh $ curl -s 'http://127.0.0.1:2122/oauth2-gitee' body contains: window.oauth2Provide = 'gitee' ``` Constraint observed: Tomcat rejects `%2F` within the path segment (a `</script>` breakout form returns HTTP 400); the quote form needs no slash and is fully linkable. 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**: GitHub Private Vulnerability Reporting - dromara/Jpom - **Status**: vendor notified 2026-10-06 through GitHub Private Vulnerability Reporting; private report coordinated disclosure via VulDB; no separate vendor channel exists for this project (no PVR, no published security contact); no CVE has been assigned; not publicly disclosed; no CVE assigned - **Duplicate check**: public advisories (NVD/OSV/GitHub) and the project issue tracker were searched before reporting; please tell us if this duplicates something already tracked internally.
Fonte⚠️ https://github.com/dromara/Jpom
Utilizador
 lucasg2g (UID 84737)
Submissão09/11/2026 08h37 (há 22 dias)
Moderação30/11/2026 16h17 (21 days later)
EstadoAceite
Entrada VulDB445705 [Dromara Jpom até 2.11.14 Web Console IndexControl.java toIndex provide Script de Site Cruzado]
Pontos19

Do you need the next level of professionalism?

Upgrade your account now!