Enviar #1082209: jetlinks jetlinks-community master source tree (pom `2.3.0-SNAPSHOT`, audited 2026-10-08; self-built `jetlinks-standalone.jar`, JDK 11); the `io-component` upload/echo chain is the mechanism to review on every version shipping i stored cross-site scriptininformación

Títulojetlinks jetlinks-community master source tree (pom `2.3.0-SNAPSHOT`, audited 2026-10-08; self-built `jetlinks-standalone.jar`, JDK 11); the `io-component` upload/echo chain is the mechanism to review on every version shipping i stored cross-site scriptin
DescripciónStored XSS in JetLinks via role-less account file upload and anonymous inline HTML retrieval Vendor: jetlinks Affected versions: master source tree (pom `2.3.0-SNAPSHOT`, audited 2026-10-08; self-built `jetlinks-standalone.jar`, JDK 11); the `io-component` upload/echo chain is the mechanism to review on every version shipping it Vulnerability class: stored cross-site scripting via unsafe file upload (CWE-79, CWE-434) Preconditions: any logged-in account for the upload step (no role or resource permission required — the upload endpoint only requires an authenticated session, verified at runtime with a role-less account). The retrieval step requires no authentication beyond the `accessKey` embedded in the URL that the upload response returns to the uploader. No configuration change is needed; this is default behavior. Stored XSS in JetLinks via role-less account file upload and anonymous inline HTML retrieval Data flow: `POST /file/upload` (multipart `file`, any logged-in account, `@Authorize(merge = false)`) → stored file gets a per-file `accessKey` (`ClusterFileManager.java:148`) and the upload response returns an `accessUrl` containing that key (`FileInfo.java:42-47`) → anonymous `GET /file/{fileId}.html?accessKey=<key>` (`@Authorize(ignore = true)`) → response served inline with `Content-Type` derived from the uploader's file extension (`FileManagerController.java:87-88` → `FileUtils.java:85-86` `.html` → `text/html`, `:71-72` `.svg` → `image/svg+xml`) → uploaded script bytes echoed verbatim with no `Content-Disposition`, no `X-Content-Type-Options`, no `Content-Security-Policy` and no `X-Frame-Options` (only the `application/octet-stream` branch forces `attachment`, `FileManagerController.java:94-101`). ### Affected interfaces | Interface | |---| | `POST /file/upload` (any logged-in account; no role or resource permission required) | | `GET /file/{fileId}.<ext>?accessKey=<key>` (anonymous; the `accessKey` is part of the URL returned by the upload response) | Primary route detail: ``` POST /file/upload (role-less authenticated user, multipart file=poc.html) -> {"id":"...","accessKey":"...","accessUrl":".../file/<id>.html?accessKey=<key>"} GET /file/<id>.html?accessKey=<key> (no credential at all) -> 200, Content-Type: text/html, body = <script>alert(document.domain)</script> ``` Why any authenticated account reaches the sink: 1. `FileManagerController.java:36` gates the upload with `@Authorize(merge = false)` — authentication only, no role or resource permission consulted. 2. The read side (`FileManagerController.java:56-74`) accepts the URL-embedded `accessKey` (or any login) and performs no owner check, so the link works for anonymous victims. ### Root cause The gap is a trust-boundary failure on uploaded content: the served `Content-Type` and inline disposition are decided by the uploader's file-name extension, and no security headers exist on the file-serving path. 1. `FileManagerController.java:87-88` — `Content-Type` from stored `FileInfo` (extension-derived): `.html` → `text/html`, `.svg` → `image/svg+xml` (`FileUtils.java:71-72, 85-86`). 2. `FileManagerController.java:94-101` — only the `application/octet-stream` type forces `Content-Disposition: attachment`; `text/html` and `image/svg+xml` are served inline. 3. No `X-Content-Type-Options`/`Content-Security-Policy`/`X-Frame-Options` on any file-serving response, and no `spring-security` dependency on this path. Baseline: self-built `jetlinks-standalone.jar` from the jetlinks-community master source tree (pom `2.3.0-SNAPSHOT`), JDK 11, bound to `127.0.0.1:18770`; fresh instance, admin login via `POST /authorize/login`. **1. Minimal-privilege uploader:** a normal user `vuser` with no role and no resource permission is created through the platform's own user API (`PATCH /user`) and logs in — proving the upload needs nothing beyond "logged in". **2. Upload (role-less token):** ```bash curl -s -X POST 'http://127.0.0.1:18770/file/upload' \ -H 'X-Access-Token: <vuser-token>' -F '[email protected]' # poc.html content (39 bytes): <script>alert(document.domain)</script> ``` Observed response: ```json {"id":"3995f5ce0a47cd80e4b7bb83d9fd2f54","accessKey":"b2e979afdc113f33bae427296d07ecec", "accessUrl":".../file/3995f5ce0a47cd80e4b7bb83d9fd2f54.html?accessKey=b2e979afdc113f33bae427296d07ecec"} ``` **3. Anonymous retrieval (no credential):** ```http GET /file/3995f5ce0a47cd80e4b7bb83d9fd2f54.html?accessKey=b2e979afdc113f33bae427296d07ecec ``` Observed response: ```http HTTP/1.1 200 OK Content-Type: text/html Content-Length: 39 file-md5: 9b50525f0e0c0487627f1406a33f8fc5 <script>alert(document.domain)</script> ``` No `Content-Disposition`, no `X-Content-Type-Options`, no `Content-Security-Policy`, no `X-Frame-Options`. **4. SVG carrier:** uploading `<svg xmlns="..." onload="alert(document.domain)"/>` and retrieving it anonymously returns `Content-Type: image/svg+xml` with the payload bytes verbatim. **5. Negative controls:** same content as `.txt` → `text/plain`; retrieval without or with a wrong `accessKey` → `HTTP 403 {"message":"Access Denied"}`; `.bin` → `application/octet-stream` + `Content-Disposition: attachment`. Note: the test host had no desktop browser, so no real browser execution was recorded; the server-side evidence (inline `text/html`, script bytes returned byte-for-byte, no `nosniff`/CSP/frame headers) is the basis of this report. - **Vendor contact**: GitHub Private Vulnerability Reporting - jetlinks/jetlinks-community - **Status**: vendor notification being sent through GitHub Private Vulnerability Reporting; private report https://github.com/jetlinks/jetlinks-community/security/advisories/GHSA-cv53-8c4v-pf4f; 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.
Fuente⚠️ https://github.com/jetlinks/jetlinks-community
Usuario
 lucasg2g (UID 84737)
Sumisión2026-11-09 08:33 (hace 24 días)
Moderación2026-12-03 09:20 (24 days later)
EstadoAceptado
Entrada de VulDB448604 [jetlinks jetlinks-community hasta 2.11 File Manager read secuencias de comandos en sitios cruzados]
Puntos20

Do you want to use VulDB in your project?

Use the official API to access entries easily!