CVE-2026-142549: JWTKit X.509 Validation Time Controlled By Vulnerability
MODERATECVE-2026-142549 is a MODERATE (CVSS 4.9) x.509 validation time controlled by vulnerability (CWE-345: Insufficient Verification of Data Authenticity) affecting JWTKit libraries in the SwiftURL ecosystem. The issue involves x.509 validation time controlled by unauthenticated jwt payload (certificate expiration bypass). Remediation is available by upgrading affected packages to version 5.8.0.
CVE-2026-142549 at a Glance
Security Impact
CVSS: 4.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2026-142549
To remediate this vulnerability, upgrade all affected JWTKit dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/vapor/jwt-kit to 5.8.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/vapor/jwt-kit
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-142549, inspect your project dependencies for JWTKit:
inspect dependencies for github.com/vapor/jwt-kit
Analyze the terminal output to locate any version of JWTKit in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.8.0), 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 JWTKit, 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
CVE-2026-142549 Affected JWTKit Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/vapor/jwt-kit
|
SwiftURL |
< 5.8.0
|
5.8.0
|
References
Frequently Asked Questions
What is CVE-2026-142549?
Which JWTKit versions are affected?
What version fixes CVE-2026-142549?
Is github.com/vapor/jwt-kit affected?
What is the CVSS score of CVE-2026-142549?
What CWE is associated with CVE-2026-142549?
How can I check SwiftURL dependencies for CVE-2026-142549?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pfgx-7g34-46fm",
"modified" : "2026-12-02T22:05:14Z",
"published" : "2026-12-02T22:05:14Z",
"aliases" : [ "CVE-2026-142549" ],
"summary" : "JWTKit: X.509 validation time controlled by unauthenticated JWT payload (certificate expiration bypass)",
"details" : "### Summary\n X5CVerifier.verifyJWS() decodes ValidationTimePayload.signedDate before verifying the JWS signature and uses it as fixedExpiryValidationTime during X.509 certificate validation.\n\nSince 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.\n\n### Details\nAffected Code\n* Sources/JWTKit/X5C/X5CVerifier.swift (certificate validation order)\n* Sources/JWTKit/X5C/ValidationTimePayload.swift\n\nThe verification flow is:\n1. Parse JWT\n2. Decode payload\n3. Read signedDate\n4. Validate X.509 chain using signedDate\n5. Verify JWS signature\n\nThis allows untrusted input to influence a security decision before authentication.\n\n### PoC\nCertificate:\n```\nNot After: 2025-01-01\nCurrent date: 2026-06-01\n```\nJWT payload:\n```\n{\n \"sub\": \"attacker\",\n \"signedDate\": \"2024-06-01T12:00:00Z\"\n}\n```\nThe token is signed today using the expired private key.\nDuring verification:\n```\ndate = payload.signedDate\n\nRFC5280Policy(\n fixedExpiryValidationTime: date\n)\n```\nThe certificate chain is validated against 2024-06-01 instead of the current time, succeeds, and the newly created JWT is accepted.\n\n### Impact\nAn 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.\n\n### Recommendation\n\nDo 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "SwiftURL",
"name" : "github.com/vapor/jwt-kit"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.8.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.7.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vapor/jwt-kit/security/advisories/GHSA-pfgx-7g34-46fm"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-142549"
}, {
"type" : "WEB",
"url" : "https://github.com/vapor/jwt-kit/commit/8229a0aff8e60ab89f40839db4ea3e847a79bfa5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vapor/jwt-kit"
}, {
"type" : "WEB",
"url" : "https://github.com/vapor/jwt-kit/releases/tag/5.8.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-345" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-12-02T22:05:14Z",
"nvd_published_at" : "2026-12-02T21:18:16Z"
}
}