npm / jose
jose
What changed in jose 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.
jose 652 changes
Breaking changes 16
Mixed b64 modes are rejected for empty General JWS payloads.
Mixed payload encoding modes are rejected.
Empty protected headers and JWE AAD members are rejected.
Verification key metadata is enforced.
JWT verification policies must be explicit.
EmbeddedJWK now rejects a non-string alg value.
Decryption now enforces a single recipient for dir and ECDH-ES algorithms.
Presence checks now require properties owned by the JOSE object.
Truncated ASN.1 key data is rejected.
Characters outside the Base64URL alphabet are rejected.
Duplicate crit values are rejected when producing JOSE objects.
Rejects a crv option that is not implied by the selected algorithm.
Invalid UTF-8 is rejected in JOSE Headers and JWT Claims Sets.
Unencoded payloads are rejected when using JWS Compact Serialization.
Non-ASCII token segments now produce JOSE errors.
Failed decompression is now rejected with a JWEInvalid error.
Security 8
AES-GCM tag boundaries are enforced.
DER truncated past its outer length is rejected.
The ext and key_ops parameters are validated.
Protected headers cannot be replaced.
Unencoded payload strings are validated.
Unsecured protected headers are validated.
JWE objects with colliding generated Key Management Parameters are now rejected.
Invalid PBES2 p2c values are now cleanly rejected.
New APIs and options 3
Discriminated JOSE error types are available for more precise TypeScript error handling.
Re-introduces support for the JWE zip (Compression Algorithm) Header Parameter.
setKeyManagementParameters is now exposed on a GeneralEncrypt Recipient.
Tooling 2
JOSE identifier unions and JWK narrowing improve TypeScript type precision.
JWK narrowing improves TypeScript type precision.
Fixes and other changes 23
Builder claim values are validated.
Invalid decrypted CEK lengths are concealed.
Invalid duration inputs are rejected.
Explicit encryption parameters are validated.
Key generation and import options are validated.
Key resolution inputs are normalized.
Empty octet-sequence keys are accepted.
Invalid remote duration values are rejected.
Overlapping remote reloads are ordered.
Serialization members are consumed only once.
Serialized header values are validated.
The PBES2 p2c parameter is no longer deprecated in the type definitions.
Type declarations now accept host CryptoKey declarations.
The clockTolerance option is validated to ensure it is finite.
CryptoKey types are corrected for more accurate TypeScript usage.
The currentDate option is validated to ensure it is finite.
Claim values are compared correctly when validation options are falsy.
JWE processing now handles additional authenticated data with zero length.
Key management parameters are forwarded correctly when a JWE has a single recipient.
JWK types are corrected for more accurate TypeScript usage.
JWT header types are corrected for more accurate TypeScript usage.
Key and result type inference is improved for TypeScript consumers.
Key resolver types are corrected for more accurate TypeScript usage.