CVE-2026-42206: Roadiz/openid OpenID Connect Nonce Generated But Vulnerability

MODERATE
Advisory Identifier: GHSA-3gx8-q682-38mx
CWE-345
Published
Advisory Summary

CVE-2026-42206 is a MODERATE openid connect nonce generated but vulnerability (CWE-345: Insufficient Verification of Data Authenticity) affecting Roadiz/openid libraries in the Packagist ecosystem. The issue involves openid connect nonce generated but never validated — id token replay attack. Remediation is available by upgrading affected packages to version 2.7.18, 2.6.31, 2.5.45, 2.3.43.

CVE-2026-42206 at a Glance

CVE Identifier CVE-2026-42206
GHSA Identifier GHSA-3gx8-q682-38mx
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-345: Insufficient Verification of Data Authenticity
Affected Product Roadiz/openid
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2026-42206

To remediate this vulnerability, upgrade all affected Roadiz/openid dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

roadiz/openid fixed: 2.7.18
Upgrade roadiz/openid to 2.7.18
roadiz/openid fixed: 2.6.31
Upgrade roadiz/openid to 2.6.31
roadiz/openid fixed: 2.5.45
Upgrade roadiz/openid to 2.5.45
roadiz/openid fixed: 2.3.43
Upgrade roadiz/openid to 2.3.43
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for roadiz/openid

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-42206, inspect your project dependencies for Roadiz/openid:

inspect dependencies for roadiz/openid

Analyze the terminal output to locate any version of Roadiz/openid in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.7.18), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-345: Insufficient Verification of Data Authenticity, where the product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data. In Roadiz/openid, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary The `roadiz/openid` package generates an OIDC nonce in `OAuth2LinkGenerator::generate()` and includes it in the authorization request sent to the identity provider, but **never stores it** and **never validates it** on the callback. The `OpenIdJwtConfigurationFactory` validation chain does not include a nonce constraint, and `OpenIdAuthenticator::authenticate()` never checks the nonce claim in the returned ID token against a stored value. ### Details In `src/OAuth2LinkGenerator.php`, a nonce is created and sent to the IdP: ```php 'nonce' => $this->tokenGenerator->generateToken(), ``` However, this value is neither stored in session, cache, nor any other persistent store. In `src/OpenIdJwtConfigurationFactory.php`, the JWT validation constraints are: - `LooseValidAt` (expiry) - `PermittedFor` (audience) - `IssuedBy` (issuer) - `HostedDomain` (optional) - `UserInfoEndpoint` (optional) **No nonce constraint is present.** In `src/Authentication/OpenIdAuthenticator.php`, the `authenticate()` method validates the state CSRF token correctly (fixed in v2.7.10), but never retrieves a stored nonce or compares it against the `nonce` claim in the ID token. ### PoC 1. Obtain a valid ID token from a legitimate OIDC flow for a target user (e.g. via network interception, browser history leak, or referrer header exposure on a non-HTTPS redirect). 2. Replay the ID token: Since the nonce in the token is never cross-checked against a client-stored value, the token passes all validation constraints as long as it has not expired. 3. Result: An attacker can authenticate as the victim within the ID token's validity window. Additionally, in an authorization code flow with multiple concurrent sessions, a malicious IdP or a compromised token endpoint could inject a token with a mismatched nonce, and the application would accept it silently. ### Impact - **ID token replay attacks**: Valid but intercepted tokens can be reused for authentication within their validity period. - **Token injection attacks**: A malicious or compromised identity provider can inject tokens across sessions without detection. - Affects any Roadiz application using the `roadiz/openid` package with OpenID Connect SSO. The OIDC Core 1.0 specification (Section 3.1.3.7) explicitly requires clients to verify the `nonce` claim if it was present in the authorization request.

CVE-2026-42206 Affected Roadiz/openid Versions

4 component(s)
Fixed Versions:
2.7.182.6.312.5.452.3.43
Product / Package Ecosystem Affected Versions Fixed Version
roadiz/openid
Packagist
≥ 2.7.0
< 2.7.18
2.7.18
roadiz/openid
Packagist
≥ 2.6.0
< 2.6.31
2.6.31
roadiz/openid
Packagist
≥ 2.5.0
< 2.5.45
2.5.45
roadiz/openid
Packagist
< 2.3.43
2.3.43

References

Frequently Asked Questions

What is CVE-2026-42206?
CVE-2026-42206 is a security vulnerability in Roadiz/openid involving OpenID Connect nonce generated but never validated — ID token replay attack under CWE-345: Insufficient Verification of Data Authenticity.
Which Roadiz/openid versions are affected?
Affected versions include releases prior to 2.7.18, 2.6.31, 2.5.45, 2.3.43 across affected packages: roadiz/openid.
What version fixes CVE-2026-42206?
Upgrading to 2.7.18, 2.6.31, 2.5.45, 2.3.43 (or the latest patched release for your respective branch) resolves the vulnerability.
Is roadiz/openid affected?
Yes, roadiz/openid is affected in releases prior to 2.7.18, 2.6.31, 2.5.45, 2.3.43. Upgrade your dependency to 2.7.18, 2.6.31, 2.5.45, 2.3.43 or later.
What CWE is associated with CVE-2026-42206?
CVE-2026-42206 is classified under CWE-345: Insufficient Verification of Data Authenticity (The product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data.).
How can I check Packagist dependencies for CVE-2026-42206?
Run the dependency tree command: 'inspect dependencies for roadiz/openid'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3gx8-q682-38mx",
  "modified" : "2026-05-13T13:38:01Z",
  "published" : "2026-04-29T20:51:40Z",
  "aliases" : [ "CVE-2026-42206" ],
  "summary" : "OpenID Connect nonce generated but never validated — ID token replay attack",
  "details" : "### Summary\nThe `roadiz/openid` package generates an OIDC nonce in `OAuth2LinkGenerator::generate()` and includes it in the authorization request sent to the identity provider, but **never stores it** and **never validates it** on the callback. The `OpenIdJwtConfigurationFactory` validation chain does not include a nonce constraint, and `OpenIdAuthenticator::authenticate()` never checks the nonce claim in the returned ID token against a stored value.\n\n### Details\nIn `src/OAuth2LinkGenerator.php`, a nonce is created and sent to the IdP:\n```php\n'nonce' => $this->tokenGenerator->generateToken(),\n```\nHowever, this value is neither stored in session, cache, nor any other persistent store.\n\nIn `src/OpenIdJwtConfigurationFactory.php`, the JWT validation constraints are:\n- `LooseValidAt` (expiry)\n- `PermittedFor` (audience)\n- `IssuedBy` (issuer)\n- `HostedDomain` (optional)\n- `UserInfoEndpoint` (optional)\n\n**No nonce constraint is present.**\n\nIn `src/Authentication/OpenIdAuthenticator.php`, the `authenticate()` method validates the state CSRF token correctly (fixed in v2.7.10), but never retrieves a stored nonce or compares it against the `nonce` claim in the ID token.\n\n### PoC\n1. Obtain a valid ID token from a legitimate OIDC flow for a target user (e.g. via network interception, browser history leak, or referrer header exposure on a non-HTTPS redirect).\n2. Replay the ID token: Since the nonce in the token is never cross-checked against a client-stored value, the token passes all validation constraints as long as it has not expired.\n3. Result: An attacker can authenticate as the victim within the ID token's validity window.\n\nAdditionally, in an authorization code flow with multiple concurrent sessions, a malicious IdP or a compromised token endpoint could inject a token with a mismatched nonce, and the application would accept it silently.\n\n### Impact\n- **ID token replay attacks**: Valid but intercepted tokens can be reused for authentication within their validity period.\n- **Token injection attacks**: A malicious or compromised identity provider can inject tokens across sessions without detection.\n- Affects any Roadiz application using the `roadiz/openid` package with OpenID Connect SSO.\n\nThe OIDC Core 1.0 specification (Section 3.1.3.7) explicitly requires clients to verify the `nonce` claim if it was present in the authorization request.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "roadiz/openid"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.7.0"
      }, {
        "fixed" : "2.7.18"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "roadiz/openid"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.6.0"
      }, {
        "fixed" : "2.6.31"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "roadiz/openid"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.5.0"
      }, {
        "fixed" : "2.5.45"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "roadiz/openid"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.3.43"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/roadiz/core-bundle-dev-app/security/advisories/GHSA-3gx8-q682-38mx"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42206"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/roadiz/core-bundle-dev-app"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-345" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-29T20:51:40Z",
    "nvd_published_at" : "2026-05-08T22:16:31Z"
  }
}