Summary
In Eclipse Ditto 1.1.0 to 3.9.8, when pre-authentication is enabled, the gateway service accepts the pre-authenticated subject from a URL query parameter that a client can set. An unauthenticated remote attacker could impersonate any policy subject.
What happened
When pre-authentication is enabled, the gateway accepts the pre-authenticated subject not only from the x-ditto-pre-authenticated HTTP header set by a trusted reverse proxy, but also from an undocumented URL query parameter of the same name that a client can set. A reverse proxy that only overwrites the header therefore does not stop clients from supplying their own subject. With the default configuration of the Ditto Helm chart (global.jwtOnly: false, which implicitly enables pre-authentication), the bundled nginx skips HTTP Basic authentication for requests carrying an Authorization: Bearer header and forwards them without the pre-authentication header. An unauthenticated remote attacker can send an invalid Bearer token together with the query parameter to authenticate as any policy subject of their choosing. Pre-authentication succeeds before the JWT is validated, so the attacker can read and modify Things and Policies with that subject's permissions. The vulnerability is associated with CWE-290 and CWE-287.
Why it matters
The source describes that an unauthenticated remote attacker can gain read and modify access to Things and Policies with the permissions of the impersonated subject. The score is CVSS 4.0: 9.1 (critical severity), per CNA:eclipse, with vector CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N. CISA's KEV catalog does not list this vulnerability as actively exploited, and the source provides no indication of exploitation.
Affected products and versions
Eclipse Ditto (Eclipse Foundation), versions >= 1.1.0 and <= 3.9.8. The source does not state a fixed version.
| Product | Versions | Fixed in |
|---|---|---|
| Eclipse Foundation Eclipse Ditto | >= 1.1.0, <= 3.9.8 | — |
Action recommended by the source
As a mitigation, the vendor recommends disabling pre-authentication in the gateway (ENABLE_PRE_AUTHENTICATION=false) or, when using the Helm chart, configuring global.jwtOnly: true. The source does not state a fixed version. References: GHSA-chwq-wg27-qvfr (https://github.com/eclipse-ditto/ditto/security/advisories/GHSA-chwq-wg27-qvfr).
Sources and references
- https://gitlab.eclipse.org/security/vulnerability-reports/-/work_items/1346 — CVE Program
- https://github.com/eclipse-ditto/ditto/security/advisories/GHSA-chwq-wg27-qvfr — CVE Program
- https://gitlab.eclipse.org/security/cve-assignment/-/work_items/539 — CVE Program
Weaknesses (CWE): CWE-290, CWE-287
Relevant change history
Advisory correction
The preliminary version was replaced by the full write-up.
Published
Preliminary advisory published.