Public mode

No access to your tenant or devices. Every item links to its source. What this means

Some sources, documents or advisories need attention: 272/272 feeds/APIs · 469/469 docs · 8/9 advisories · checked 07:24 UTC Customize Public modeDiscuss ChangeIntel on Discord

fast-jwt accepts unknown `crit` header extensions (RFC 7515 violation)

Exact source revision recorded 24 Oct 2026 13:17:17 UTC. It does not establish the source's current position. Latest evidence.

osv · GHSA-hm7r-c7qw-ghp6

Published

## Summary `fast-jwt` does not validate the `crit` (Critical) Header Parameter defined in RFC 7515 §4.1.11. When a JWS token contains a `crit` array listing extensions that `fast-jwt` does not understand, the library accepts the token instead of rejecting it. This violates the **MUST** requirement in the RFC. --- ## RFC Requirement RFC 7515 §4.1.11: > If any of the listed extension Header Parameters are **not understood > and supported** by the recipient, then the **JWS is invalid**. --- ## Proof of Concept ```javascript const { createSigner, createVerifier } = require("fast-jwt"); // v3.3.3 const signer = createSigner({ key: "secret", algorithm: "HS256" }); const token = signer({ sub: "attacker", role: "admin", header: { crit: ["x-custom-policy"], "x-custom-policy": "require-mfa" }, }); // Should REJECT — x-custom-policy is not understood const verifier = createVerifier({ key: "secret", algorithms: ["HS256"] }); try { const result = verifier(token); console.log("ACCEPTED:", result); // Output: ACCEPTED: { sub: 'attacker', role: 'admin' } } catch (e) { console.log("REJECTED:", e.message); } ``` **Expected:** Error — unsupported critical extension **Actual:** Token accepted. ### Comparison ```javascript // jose (panva) v4+ — correctly rejects const jose = require("jose"); await jose.jwtVerify(token, new TextEncoder().encode("secret")); // throws: Extension Header Parameter "x-custom-policy" is not recognized ``` --- ## Impact - **Split-brain verification** in mixed-library environments - **Security policy bypass** when `crit` carries enforcement semantics - **Token binding bypass** (RFC 7800 `cnf` confirmation) - See CVE-2025-59420 for full impact analysis --- ## Suggested Fix In `src/verifier.js`, add crit validation after header decoding: ```javascript const SUPPORTED_CRIT = new Set(["b64"]); function validateCrit(header) { if (!header.crit) return; if (!Array.isArray(header.crit) || header.crit.length === 0) throw new Error("crit must be a non-empty array"); for (const ext of header.crit) { if (!SUPPORTED_CRIT.has(ext)) throw new Error(`Unsupported critical extension: ${ext}`); if (!(ext in header)) throw new Error(`Critical extension ${ext} not present in header`); } } ```

Source published
3 Apr 2026 22:01:25 UTC
Source modified
6 Apr 2026 23:49:39 UTC
Observed here
24 Oct 2026 13:17:17 UTC
Source terms
GitHub Advisory Database · CC-BY-4.0

Original source record · Cite this exact observation · Complete original publisher JSON

This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · GitHub Advisory Database · CC-BY-4.0. Source text is retained; field grouping and change labels are provided by ChangeIntel.

CVSS_V3 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Publisher rating · HIGH

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 26 Oct 07:24 UTC · 272 of 272 readable · 270 fully read · documentation 469/469 current