CVE-2026-142549
JWTKit: X. 509 validation time controlled by unauthenticated JWT payload (certificate expiration bypass)
- Severity
- 4.9MediumNetwork attack, high privileges, no user interactionCVSS 3.1, CVE List
- Exploitation
- UnknownNo source reports exploitation yet.
- Exploit chance
- 0.22% in 30 daysPercentile13thEPSS, scored
- Listed fix
5.8.0for github.com/ vapor/ jwt- kit From GitHub Advisories and OSV
Overview
JWTKit is a Swift library for signing and verifying JSON Web Tokens. Prior to 5.8.0, X5CVerifier.verifyJWS() in Sources/JWTKit/X5C/X5CVerifier.swift reads ValidationTimePayload.signedDate, defined in Sources/JWTKit/X5C/ValidationTimePayload.swift, from the token payload before verifying the JWS signature. The verifier uses that unauthenticated date as fixedExpiryValidationTime for X.509 certificate validation. An attacker possessing the private key of an expired, previously trusted certificate can backdate the value and cause newly signed tokens to be accepted despite certificate expiration. This issue is fixed in version 5.8.0.
CVSS 3.1 vector
Exploitability
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- High
- User interaction
- None
Impact
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- High
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:NExploit chance over time
Affected
Packages 1
| Package | Affected | Fixed |
|---|---|---|
github.com/vapor/jwt-kitSwiftURL | through 5.7.1 | 5.8.0 |
| before 5.8.0 | 5.8.0 |
Products 1
Sources
CVE List Score usedCVSS 3.14.9
JWTKit: X.509 validation time controlled by unauthenticated JWT payload (certificate expiration bypass)
JWTKit is a Swift library for signing and verifying JSON Web Tokens. Prior to 5.8.0, X5CVerifier.verifyJWS() in Sources/JWTKit/X5C/X5CVerifier.swift reads ValidationTimePayload.signedDate, defined in Sources/JWTKit/X5C/ValidationTimePayload.swift, from the token payload before verifying the JWS signature. The verifier uses that unauthenticated date as fixedExpiryValidationTime for X.509 certificate validation. An attacker possessing the private key of an expired, previously trusted certificate can backdate the value and cause newly signed tokens to be accepted despite certificate expiration. This issue is fixed in version 5.8.0.
- Record
CVE-2026-142549- CVSS 3.1
- 4.9 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N - Weakness
- CWE-345
- Updated
- 2026-12-03
EUVDEUVD-2026-141866CVSS 3.14.9
JWTKit is a Swift library for signing and verifying JSON Web Tokens. Prior to 5.8.0, X5CVerifier.verifyJWS() in Sources/JWTKit/X5C/X5CVerifier.swift reads ValidationTimePayload.signedDate, defined in Sources/JWTKit/X5C/ValidationTimePayload.swift, from the token payload before verifying the JWS signature. The verifier uses that unauthenticated date as fixedExpiryValidationTime for X.509 certificate validation. An attacker possessing the private key of an expired, previously trusted certificate can backdate the value and cause newly signed tokens to be accepted despite certificate expiration. This issue is fixed in version 5.8.0.
- Record
EUVD-2026-141866- CVSS 3.1
- 4.9 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-12-03
GitHub AdvisoriesGHSA-pfgx-7g34-46fmCVSS 3.14.9
JWTKit: X.509 validation time controlled by unauthenticated JWT payload (certificate expiration bypass)
Summary
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.
Details
Affected Code
- Sources/JWTKit/X5C/X5CVerifier.swift (certificate validation order)
- Sources/JWTKit/X5C/ValidationTimePayload.swift
The verification flow is:
- Parse JWT
- Decode payload
- Read signedDate
- Validate X.509 chain using signedDate
- Verify JWS signature
This allows untrusted input to influence a security decision before authentication.
PoC
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.
Impact
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.
Recommendation
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.
- Record
GHSA-pfgx-7g34-46fm- CVSS 3.1
- 4.9 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N - Weakness
- CWE-345
- Updated
- 2026-12-02
NVDCVSS 3.14.9
JWTKit is a Swift library for signing and verifying JSON Web Tokens. Prior to 5.8.0, X5CVerifier.verifyJWS() in Sources/JWTKit/X5C/X5CVerifier.swift reads ValidationTimePayload.signedDate, defined in Sources/JWTKit/X5C/ValidationTimePayload.swift, from the token payload before verifying the JWS signature. The verifier uses that unauthenticated date as fixedExpiryValidationTime for X.509 certificate validation. An attacker possessing the private key of an expired, previously trusted certificate can backdate the value and cause newly signed tokens to be accepted despite certificate expiration. This issue is fixed in version 5.8.0.
- Record
CVE-2026-142549- CVSS 3.1
- 4.9 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N - Weakness
- CWE-345
- Updated
- 2026-12-03
OSVCVSS 3.14.9
JWTKit: X.509 validation time controlled by unauthenticated JWT payload (certificate expiration bypass)
JWTKit is a Swift library for signing and verifying JSON Web Tokens. Prior to 5.8.0, X5CVerifier.verifyJWS() in Sources/JWTKit/X5C/X5CVerifier.swift reads ValidationTimePayload.signedDate, defined in Sources/JWTKit/X5C/ValidationTimePayload.swift, from the token payload before verifying the JWS signature. The verifier uses that unauthenticated date as fixedExpiryValidationTime for X.509 certificate validation. An attacker possessing the private key of an expired, previously trusted certificate can backdate the value and cause newly signed tokens to be accepted despite certificate expiration. This issue is fixed in version 5.8.0.
- Record
CVE-2026-142549- CVSS 3.1
- 4.9 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N - Weakness
- CWE-345
- Updated
- 2026-12-03
OSVGHSA-pfgx-7g34-46fmCVSS 3.14.9
JWTKit: X.509 validation time controlled by unauthenticated JWT payload (certificate expiration bypass)
Summary
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.
Details
Affected Code
- Sources/JWTKit/X5C/X5CVerifier.swift (certificate validation order)
- Sources/JWTKit/X5C/ValidationTimePayload.swift
The verification flow is:
- Parse JWT
- Decode payload
- Read signedDate
- Validate X.509 chain using signedDate
- Verify JWS signature
This allows untrusted input to influence a security decision before authentication.
PoC
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.
Impact
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.
Recommendation
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.
- Record
GHSA-pfgx-7g34-46fm- CVSS 3.1
- 4.9 Medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N - Weakness
- CWE-345
- Updated
- 2026-12-02
History
Recorded by Every CVE
| Day | Changed | Sources |
|---|---|---|
| Published date | EUVD | |
| Published date | EUVD | |
| Affected packages, references | OSV | |
| Other IDs, published date | EUVD | |
| Affected packages, other IDs, key facts, references | GitHub Advisories, NVD | |
| First indexed | CVE List |
Upstream dates may differ.
References
github.com/vapor/jwt-kit/security/advisories/GHSA-pfgx-7g34-46fm
github.com/vapor/jwt-kit/commit/8229a0aff8e60ab89f40839db4ea3e847a79bfa5
github.com/vapor/jwt-kit/releases/tag/5.8.0
nvd.nist.gov/vuln/detail/CVE-2026-142549
github.com/advisories/GHSA-pfgx-7g34-46fm
github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142549.json
github.com/vapor/jwt-kit