Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.4.0
->9.0.0
By merging this PR, the below vulnerabilities will be automatically resolved:
Release Notes
auth0/node-jsonwebtoken (jsonwebtoken)
v9.0.0
Compare Source
Breaking changes: See Migration from v8 to v9
Breaking changes
8345030
]auth0/node-jsonwebtoken@8345030)ecdf6cc
]auth0/node-jsonwebtoken@ecdf6cc)Security fixes
Arbitrary File Write via verify function
- CVE-2022-23529Insecure default algorithm in jwt.verify() could lead to signature validation bypass
- CVE-2022-23540Insecure implementation of key retrieval function could lead to Forgeable Public/Private Tokens from RSA to HMAC
- CVE-2022-23541Unrestricted key type could lead to legacy keys usage
- CVE-2022-23539v8.5.1
Compare Source
Bug fix
Docs
v8.5.0
Compare Source
New Functionality
Test Improvements
Docs
v8.4.0
Compare Source
New Functionality
Bug Fixes
Docs
Test Improvements
CI
v8.3.0
Compare Source
v8.2.2
Compare Source
v8.2.1
Compare Source
v8.2.0
Compare Source
v8.1.1
Compare Source
v8.1.0
Compare Source
v8.0.1
Compare Source
lodash.isarray
dependency (#394) (7508e8957cb1c778f72fa9a363a7b135b3c9c36d)v8.0.0
Compare Source
Breaking changes: See Migration notes from v7
v7.4.3
Compare Source
v7.4.2
Compare Source
v7.4.1
Compare Source
v7.4.0
Compare Source
v7.3.0
Compare Source
maxAge
option in README (1b0592e99cc8def293eed177e2575fa7f1cf7aa5)clockTimestamp
option toverify()
you can set the current time in seconds with it (#274) (8fdc1504f4325e7003894ffea078da9cba5208d9)verify()
input (#305) (1b6ec8d466504f58c5a6e2dae3360c828bad92fb), closes #305v7.2.1
Compare Source
v7.2.0
Compare Source
keyid
onsign
. (b412be91b89acb3a742bb609d3b54e47e1dfc441)v7.1.10
Compare Source
v7.1.9
Compare Source
v7.1.8
Compare Source
v7.1.7
Compare Source
v7.1.6
Compare Source
v7.1.5
Compare Source
v7.1.3
Compare Source
v7.1.1
Compare Source
v7.1.0
Compare Source
v7.0.1
Compare Source
v7.0.0
Compare Source
v6.2.0
Compare Source
options.clockTolerance
tojwt.verify
(65ddea934f226bf06bc9d6a55be9587515cfc38d)v6.1.2
Compare Source
v6.1.1
Compare Source
v6.1.0
Compare Source
v6.0.1
Compare Source
This was an immediate change after publishing 6.0.0.
v6.0.0
Compare Source
Change .sign to standard async callback (50873c7d45d2733244d5da8afef3d1872e657a60)
Improved the options for the
sign
method (53c3987b3cc34e95eb396b26fc9b051276e2f6f9)expiresIn
when the payload is not an object (304f1b33075f79ed66f784e27dc4f5307aa39e27)expiresInMinutes
andexpiresInSeconds
are deprecated and no longer supported.notBeforeInMinutes
andnotBeforeInSeconds
are deprecated and no longer supported.options
are strongly validated.options.expiresIn
,options.notBefore
,options.audience
,options.issuer
,options.subject
andoptions.jwtid
are mutually exclusive withpayload.exp
,payload.nbf
,payload.aud
,payload.iss
options.algorithm
is properly validated.options.headers
is renamed tooptions.header
.update CHANGELOG to reflect most of the changes. closes #136 (b87a1a8d2e2533fbfab518765a54f00077918eb7), closes #136
update readme (53a88ecf4494e30e1d62a1cf3cc354650349f486)
v5.7.0
Compare Source
v5.6.2
Compare Source
v5.6.0
Compare Source
v5.5.4
Compare Source
v5.5.3
Compare Source
v5.5.2
Compare Source
v5.5.1
Compare Source
v5.5.0
Compare Source
v5.4.1
Compare Source
v5.4.0
Compare Source
v5.3.1
Compare Source
v5.2.0
Compare Source
v5.1.0
Compare Source
v5.0.5
Compare Source
v5.0.4
Compare Source
v5.0.3
Compare Source
this
referring to the global object instead ofmodule.exports
inverify()
(93f554312e37129027fcf4916f48cb8d1b53588c)v5.0.2
Compare Source
v5.0.1
Compare Source
v5.0.0
Compare Source
Changed
iat
if the user does not specify that argument.auth0/node-jsonwebtoken@e900282
auth0/node-jsonwebtoken@35036b1
auth0/node-jsonwebtoken@954bd7a
auth0/node-jsonwebtoken@24a3700
auth0/node-jsonwebtoken@a77df6d
Security
header.alg
mismatch exception toinvalid algorithm
and adding more mismatch tests.As
[email protected]
changed the verify method signature to bejws.verify(signature, algorithm, secretOrKey)
, the token header must be decoded first in order to make sure that thealg
field matches one of the allowedoptions.algorithms
. After that, the now validatedheader.alg
is passed tojws.verify
As the order of steps has changed, the error that was thrown when the JWT was invalid is no longer the
jws
one:That old error (removed from jws) has been replaced by a
JsonWebTokenError
with messageinvalid token
.auth0/node-jsonwebtoken@634b8ed
auth0/node-jsonwebtoken@9f24ffd
auth0/node-jsonwebtoken@19e6cc6
auth0/node-jsonwebtoken@1e46234
auth0/node-jsonwebtoken@954bd7a
auth0/node-jsonwebtoken@24a3700
auth0/node-jsonwebtoken@a77df6d
v4.2.2
Compare Source
Fixed
jfromaniello - awlayton
)auth0/node-jsonwebtoken@4027946
auth0/node-jsonwebtoken@8df6aab
v4.2.1
Compare Source
Fixed
jfromaniello
)auth0/node-jsonwebtoken@7017e74
v4.2.0
Compare Source
Security
When the verification part was expecting a token digitally signed with an asymmetric key (RS/ES family) of algorithms an attacker could send a token signed with a symmetric algorithm (HS* family).
The issue was caused because the same signature was used to verify both type of tokens (
verify
method parameter:secretOrPublicKey
).This change adds a new parameter to the verify called
algorithms
. This can be used to specify a list of supported algorithms, but the default value depends on the secret used: if the secretOrPublicKey contains the stringBEGIN CERTIFICATE
the default is[ 'RS256','RS384','RS512','ES256','ES384','ES512' ]
otherwise is[ 'HS256','HS384','HS512' ]
. (jfromaniello
)auth0/node-jsonwebtoken@c2bf7b2
auth0/node-jsonwebtoken@1bb584b
v4.1.0
Compare Source
Changed
typ
property. 5290db1v4.0.0
[Compar