Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

build(deps): bump github.com/lestrrat-go/jwx/v2 from 2.0.15 to 2.0.16 #332

Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 6, 2023

Bumps github.com/lestrrat-go/jwx/v2 from 2.0.15 to 2.0.16.

Release notes

Sourced from github.com/lestrrat-go/jwx/v2's releases.

v2.0.16

v2.0.16 31 Oct 2023
[Security]
  * [jws] ECDSA signature verification requires us to check if the signature
    is of the desired length of bytes, but this check that used to exist before
    had been removed in [#65](https://github.com/lestrrat-go/jwx/issues/65), resulting in certain malformed signatures to pass
    verification.
One of the ways this could happen if R is a 31 byte integer and S is 32 byte integer,
both containing the correct signature values, but R is not zero-padded.

Correct = R: [ 0 , ... ] (32 bytes) S: [ ... ] (32 bytes)
Wrong = R: [ ... ] (31 bytes) S: [ ... ] (32 bytes)

In order for this check to pass, you would still need to have all 63 bytes
populated with the correct signature. The only modification a bad actor
may be able to do is to add one more byte at the end, in which case the
first 32 bytes (including what would have been S's first byte) is used for R,
and S would contain the rest. But this will only result in the verification to
fail. Therefore this in itself should not pose any security risk, albeit
allowing some illegally formated messages to be verified.

  • [jwk] jwk.Key objects now have a Validate() method to validate the data stored in the keys. However, this still does not necessarily mean that the key's are valid for use in cryptographic operations. If Validate() is successful, it only means that the keys are in the right format, including the presence of required fields and that certain fields have proper length, etc.

[New Features]

  • [jws] Added jws.WithValidateKey() to force calling key.Validate() before signing or verification.

  • [jws] jws.Sign() now returns a special type of error that can hold the individual errors from the signers. The stringification is still the same as before to preserve backwards compatibility.

  • [jwk] Added jwk.IsKeyValidationError that checks if an error is an error from key.Validate().

[Bug Fixes]

  • [jwt] jwt.ParseInsecure() was running verification if you provided a key via jwt.WithKey() or jwt.WithKeySet() (#1007)
Changelog

Sourced from github.com/lestrrat-go/jwx/v2's changelog.

v2.0.16 31 Oct 2023 [Security]

  • [jws] ECDSA signature verification requires us to check if the signature is of the desired length of bytes, but this check that used to exist before had been removed in #65, resulting in certain malformed signatures to pass verification.

    One of the ways this could happen if R is a 31 byte integer and S is 32 byte integer, both containing the correct signature values, but R is not zero-padded.

    Correct = R: [ 0 , ... ] (32 bytes) S: [ ... ] (32 bytes) Wrong = R: [ ... ] (31 bytes) S: [ ... ] (32 bytes)

    In order for this check to pass, you would still need to have all 63 bytes populated with the correct signature. The only modification a bad actor may be able to do is to add one more byte at the end, in which case the first 32 bytes (including what would have been S's first byte) is used for R, and S would contain the rest. But this will only result in the verification to fail. Therefore this in itself should not pose any security risk, albeit allowing some illegally formated messages to be verified.

  • [jwk] jwk.Key objects now have a Validate() method to validate the data stored in the keys. However, this still does not necessarily mean that the key's are valid for use in cryptographic operations. If Validate() is successful, it only means that the keys are in the right format, including the presence of required fields and that certain fields have proper length, etc.

[New Features]

  • [jws] Added jws.WithValidateKey() to force calling key.Validate() before signing or verification.

  • [jws] jws.Sign() now returns a special type of error that can hold the individual errors from the signers. The stringification is still the same as before to preserve backwards compatibility.

  • [jwk] Added jwk.IsKeyValidationError that checks if an error is an error from key.Validate().

[Bug Fixes]

  • [jwt] jwt.ParseInsecure() was running verification if you provided a key via jwt.WithKey() or jwt.WithKeySet() (#1007)
Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/lestrrat-go/jwx/v2](https://github.com/lestrrat-go/jwx) from 2.0.15 to 2.0.16.
- [Release notes](https://github.com/lestrrat-go/jwx/releases)
- [Changelog](https://github.com/lestrrat-go/jwx/blob/develop/v2/Changes)
- [Commits](lestrrat-go/jwx@v2.0.15...v2.0.16)

---
updated-dependencies:
- dependency-name: github.com/lestrrat-go/jwx/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Nov 6, 2023
@dependabot dependabot bot requested a review from a team November 6, 2023 21:56
@codecov-commenter
Copy link

Codecov Report

Merging #332 (5c2675e) into main (dbf1918) will not change coverage.
The diff coverage is n/a.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@           Coverage Diff           @@
##             main     #332   +/-   ##
=======================================
  Coverage   67.22%   67.22%           
=======================================
  Files          10       10           
  Lines        1605     1605           
=======================================
  Hits         1079     1079           
  Misses        489      489           
  Partials       37       37           
Flag Coverage Δ
unittests 67.22% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

Copy link

@kusalananda kusalananda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dependabot merge

@dependabot dependabot bot merged commit 0928c90 into main Nov 7, 2023
7 checks passed
@dependabot dependabot bot deleted the dependabot/go_modules/github.com/lestrrat-go/jwx/v2-2.0.16 branch November 7, 2023 10:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants