jose
6.2.18 · 18 Nov 2026MIT244.2M / weekRepositorynpmAtom feed
2.0.7 is the newest release of 2.x.
In short
14 breaking2 removed2 deprecated2 new2 fixed3 internal
- Breaking
The
JWE.decryptoptionalgorithmswas removed and replaced with contentEncryptionAlgorithms (handlesencallowlist) and keyManagementAlgorithms (handlesalgallowlist) - Breaking
The
JWT.verifyprofile option was removed, use e.g.JWT.IdToken.verifyinstead. - Breaking
Removed the
maxAuthAgeJWT.verifyoption, this option is now only present at the specific JWT profile APIs where theauth_timeproperty applies. - Breaking
Removed the
nonceJWT.verifyoption, this option is now only present at the specific JWT profile APIs where thenonceproperty applies. - Breaking
The
acr,amr,nonceandazpclaim value types will only be checked when verifying a specific JWT profile using its dedicated API. - Breaking
Using the draft implementing APIs will emit a one-time warning per process using
process.emitWarning - Breaking
JWT.signfunction options no longer accept anonceproperty. To create a JWT with anoncejust pass the value to the payload. - Breaking
Due to added ESM module support Node.js version with ESM implementation bugs are no longer supported, this only affects early v13.x versions. The resulting Node.js semver range is
>=10.13.0 < 13 || >=13.7.0
Security
3 advisories affect 2.0.0; 2.0.7 fixes them
- Moderatejose vulnerable to resource exhaustion via specifically crafted JWE with compressed plaintextGHSA-hhhv-q57g-882q · 7 Mar 2024Fixed in 2.0.7
- ModerateJOSE vulnerable to resource exhaustion via specifically crafted JWEGHSA-jv3g-j58f-9mq9 · 16 Sep 2022Fixed in 2.0.6
- ModeratePadding Oracle Attack due to Observable Timing Discrepancy in joseGHSA-58f5-hfqc-jgch · 19 Apr 2021Fixed in 2.0.5
Release note
Breaking changes
- Breaking
The
JWE.decryptoptionalgorithmswas removed and replaced with contentEncryptionAlgorithms (handlesencallowlist) and keyManagementAlgorithms (handlesalgallowlist) - Breaking
The
JWT.verifyprofile option was removed, use e.g.JWT.IdToken.verifyinstead. - Breaking
Removed the
maxAuthAgeJWT.verifyoption, this option is now only present at the specific JWT profile APIs where theauth_timeproperty applies. - Breaking
Removed the
nonceJWT.verifyoption, this option is now only present at the specific JWT profile APIs where thenonceproperty applies. - Breaking
The
acr,amr,nonceandazpclaim value types will only be checked when verifying a specific JWT profile using its dedicated API. - Breaking
Using the draft implementing APIs will emit a one-time warning per process using
process.emitWarning - Breaking
JWT.signfunction options no longer accept anonceproperty. To create a JWT with anoncejust pass the value to the payload. - Breaking
Due to added ESM module support Node.js version with ESM implementation bugs are no longer supported, this only affects early v13.x versions. The resulting Node.js semver range is
>=10.13.0 < 13 || >=13.7.0 - Deprecated
Deprecated method
JWK.importKeywas removed - Deprecated
Deprecated method
JWKS.KeyStore.fromJWKSwas removed - Breaking
The use of unregistered curve name P-256K for secp256k1 was removed
- Breaking
Jose.JWE.Encrypt constructor aad and unprotectedHeader arguments swapped places
- Breaking
Jose.JWE.encrypt.flattened header (unprotectedHeader) and aad arguments swapped places
- Breaking
Jose.JWE.encrypt.general header (unprotectedHeader) and aad arguments swapped places
- Breaking
JWS.verify returned payloads are now always buffers
- Breaking
JWS.verify options
encodingandparsewere removed
Features
Added support for ESM (ECMAScript modules)
Decrypt allowlists for both key management and content encryption
Bug Fixes
typescript: allow Buffer when verifying detached signature
typescript: properly type all decode/verify/decrypt fn options
Refactor
- Removed
Removed
nonceoption fromJWT.sign - Removed
Removed deprecated methods and utilities
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.