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.
In src/OAuth2LinkGenerator.php, a nonce is created and sent to the IdP:
'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.
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.
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.
{
"cwe_ids": [
"CWE-345"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-29T20:51:40Z",
"nvd_published_at": "2026-05-08T22:16:31Z",
"severity": "MODERATE"
}