jose
6.2.18 · 18 Nov 2026MIT244.2M / weekRepositorynpmAtom feed
4.15.9 is the newest release of 4.x.
In short
10 breaking1 internal
- Breaking
All module named exports have moved from subpaths to just "jose". For example,
import { jwtVerify } from 'jose/jwt/verify'is now justimport { jwtVerify } from 'jose'. - Breaking
All submodule default exports and named have been removed in favour of just "jose" named exports.
- Breaking
typescript: remove repeated type re-exports
- Breaking
The undocumented
jose/util/randomwas removed. - Breaking
The
jose/jwk/thumbprintnamed export is renamed tocalculateJwkThumbprint, nowimport { calculateJwkThumbprint } from 'jose' - Breaking
The deprecated
jose/jwk/parsemodule was removed, useimport { importJWK } from 'jose'instead. - Breaking
The deprecated
jose/jwk/from_key_likemodule was removed, useimport { exportJWK } from 'jose'instead. - Breaking
All
importstatements,require(), orimport()invocations should be changed to use just'jose'as the target.
Security
2 advisories affect 4.0.0; 4.15.5 fixes them
- Moderatejose vulnerable to resource exhaustion via specifically crafted JWE with compressed plaintextGHSA-hhhv-q57g-882q · 7 Mar 2024Fixed in 4.15.5
- ModerateJOSE vulnerable to resource exhaustion via specifically crafted JWEGHSA-jv3g-j58f-9mq9 · 16 Sep 2022Fixed in 4.9.2
Release note
Breaking changes
- Breaking
All module named exports have moved from subpaths to just "jose". For example,
import { jwtVerify } from 'jose/jwt/verify'is now justimport { jwtVerify } from 'jose'. - Breaking
All submodule default exports and named have been removed in favour of just "jose" named exports.
- Breaking
typescript: remove repeated type re-exports
- Breaking
The undocumented
jose/util/randomwas removed. - Breaking
The
jose/jwk/thumbprintnamed export is renamed tocalculateJwkThumbprint, nowimport { calculateJwkThumbprint } from 'jose' - Breaking
The deprecated
jose/jwk/parsemodule was removed, useimport { importJWK } from 'jose'instead. - Breaking
The deprecated
jose/jwk/from_key_likemodule was removed, useimport { exportJWK } from 'jose'instead.
Migration Guide
Migrating from v3.x to v4.x is very straight forward.
- Breaking
All
importstatements,require(), orimport()invocations should be changed to use just'jose'as the target. - Breaking
There are no more default exports. Everything was converted to a named export.
- Breaking
Any custom resolvers targeting
josedist files for jest, typescript, or other tooling should be removed
// before (v3.x)
import { jwtVerify } from 'jose/jwt/verify'
import { SignJWT } from 'jose/jwt/sign'
import * as errors from 'jose/util/errors'
// after (v4.x)
import { jwtVerify, SignJWT, errors } from 'jose'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.