X5CVerifier.verifyJWS() decodes ValidationTimePayload.signedDate before verifying the JWS signature and uses it as fixedExpiryValidationTime during X.509 certificate validation.
Since signedDate originates from an unauthenticated payload, an attacker can backdate certificate validation and bypass certificate expiration if they possess the private key of an expired, previously trusted certificate.
Affected Code
The verification flow is:
This allows untrusted input to influence a security decision before authentication.
Certificate:
Not After: 2025-01-01
Current date: 2026-06-01
JWT payload:
{
"sub": "attacker",
"signedDate": "2024-06-01T12:00:00Z"
}
The token is signed today using the expired private key. During verification:
date = payload.signedDate
RFC5280Policy(
fixedExpiryValidationTime: date
)
The certificate chain is validated against 2024-06-01 instead of the current time, succeeds, and the newly created JWT is accepted.
An attacker with the private key of an expired certificate can generate new JWTs that are accepted by setting signedDate to a time when the certificate was still valid, effectively bypassing certificate expiration.
Do not derive X.509 validation time from unauthenticated JWT payloads. Validate the certificate chain using the current time (or another trusted source), and only trust signedDate after successful JWS verification.
{
"cwe_ids": [
"CWE-345"
],
"github_reviewed": true,
"github_reviewed_at": "2026-12-02T22:05:14Z",
"nvd_published_at": "2026-12-02T21:18:16Z",
"severity": "MODERATE"
}