Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency jsonwebtoken to v9 #199

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mend-for-github-com[bot]
Copy link

@mend-for-github-com mend-for-github-com bot commented Mar 26, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
jsonwebtoken 0.4.0 -> 9.0.2 age adoption passing confidence
@types/jsonwebtoken (source) ^8.5.0 -> ^9.0.0 age adoption passing confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

auth0/node-jsonwebtoken (jsonwebtoken)

v9.0.2

Compare Source

  • security: updating semver to 7.5.4 to resolve CVE-2022-25883, closes #​921.
  • refactor: reduce library size by using lodash specific dependencies, closes #​878.

v9.0.1

Compare Source

  • fix(stubs): allow decode method to be stubbed

v9.0.0

Compare Source

Breaking changes: See Migration from v8 to v9

Breaking changes
Security fixes
  • security: fixes Arbitrary File Write via verify function - CVE-2022-23529
  • security: fixes Insecure default algorithm in jwt.verify() could lead to signature validation bypass - CVE-2022-23540
  • security: fixes Insecure implementation of key retrieval function could lead to Forgeable Public/Private Tokens from RSA to HMAC - CVE-2022-23541
  • security: fixes Unrestricted key type could lead to legacy keys usage - CVE-2022-23539

v8.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

v8.0.0

Compare Source

Breaking changes: See Migration notes from v7

v7.4.3

Compare Source

  • Fix breaking change on 7.4.2 for empty secret + "none" algorithm (sync code style) (PR 386)

v7.4.2

Compare Source

v7.4.1

Compare Source

v7.4.0

Compare Source

v7.3.0

Compare Source

v7.2.1

Compare Source

v7.2.0

Compare Source

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

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

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

v5.0.2

Compare Source

v5.0.1

Compare Source

v5.0.0

Compare Source

Changed
  • [sign] Only set defautl 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
  • [verify] Update to jws@^3.0.0 and renaming header.alg mismatch exception to invalid algorithm and adding more mismatch tests.

As jws@3.0.0 changed the verify method signature to be jws.verify(signature, algorithm, secretOrKey), the token header must be decoded first in order to make sure that the alg field matches one of the allowed options.algorithms. After that, the now validated header.alg is passed to jws.verify

As the order of steps has changed, the error that was thrown when the JWT was invalid is no longer the jws one:

{ [Error: Invalid token: no header in signature 'a.b.c'] code: 'MISSING_HEADER', signature: 'a.b.c' }

That old error (removed from jws) has been replaced by a JsonWebTokenError with message invalid token.

Important: versions >= 4.2.2 this library are safe to use but we decided to deprecate everything < 5.0.0 to prevent security warnings from library node-jws when doing npm install.

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

v4.2.1

Compare Source

Fixed

v4.2.0

Compare Source

Security
  • [asymmetric-keys] Making sure a token signed with an asymmetric key will be verified using a asymmetric key.
    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 string BEGIN 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
  • Assume the payload is JSON even when there is no typ property. 5290db1

v4.0.0

Compare Source

Changed
  • The default encoding is now utf8 instead of binary. 92d33bd
  • Add encoding as a new option to sign. 1fc385e
  • Add ignoreExpiration to verify. 8d4da27
  • Add expiresInSeconds to sign. dd156cc
Fixed
  • Fix wrong error message when the audience doesn't match. 44e3c8d
  • Fix wrong error message when the issuer doesn't match. 44e3c8d
  • Fix wrong iat and exp values when signing with noTimestamp. 331b7bc

v3.2.2

Compare Source

v3.2.1

Compare Source

v3.2.0

Compare Source

v3.1.1

[Compare S


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

@mend-for-github-com mend-for-github-com bot added the security fix Security fix generated by WhiteSource label Mar 26, 2023
@mend-for-github-com mend-for-github-com bot changed the title Update dependency jsonwebtoken to v9 Update dependency @types/jsonwebtoken to v9 Mar 28, 2023
@mend-for-github-com mend-for-github-com bot changed the title Update dependency @types/jsonwebtoken to v9 Update dependency jsonwebtoken to v9 Mar 31, 2023
@mend-for-github-com mend-for-github-com bot force-pushed the whitesource-remediate/jsonwebtoken-9.x branch from 021bf23 to 67470ea Compare July 5, 2023 18:14
@mend-for-github-com mend-for-github-com bot force-pushed the whitesource-remediate/jsonwebtoken-9.x branch from 67470ea to ece94df Compare August 31, 2023 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security fix Security fix generated by WhiteSource
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants