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

dependency: update dependency jose to v4.15.5 [security] #29086

Merged
merged 8 commits into from
Mar 13, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 7, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
jose 4.11.2 -> 4.15.5 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2024-28176

A vulnerability has been identified in the JSON Web Encryption (JWE) decryption interfaces, specifically related to the support for decompressing plaintext after its decryption. This allows an adversary to exploit specific scenarios where the compression ratio becomes exceptionally high. As a result, the length of the JWE token, which is determined by the compressed content's size, can land below application-defined limits. In such cases, other existing application level mechanisms for preventing resource exhaustion may be rendered ineffective.

Note that as per RFC 8725 compression of data SHOULD NOT be done before encryption, because such compressed data often reveals information about the plaintext. For this reason the v5.x major version of jose removed support for compressed payloads entirely and is therefore NOT affected by this advisory.

Impact

Under certain conditions it is possible to have the user's environment consume unreasonable amount of CPU time or memory during JWE Decryption operations.

Affected users

The impact is limited only to Node.js users utilizing the JWE decryption APIs to decrypt JWEs from untrusted sources.

You are NOT affected if any of the following applies to you

  • Your code uses jose version v5.x where JWE Compression is not supported anymore
  • Your code runs in an environment other than Node.js (e.g. Deno, CF Workers), which is the only runtime where JWE Compression is implemented out of the box
  • Your code does not use the JWE decryption APIs
  • Your code only accepts JWEs produced by trusted sources

Patches

v2.0.7 and v4.15.5 releases limit the decompression routine to only allow decompressing up to 250 kB of plaintext. In v4.x it is possible to further adjust this limit via the inflateRaw decryption option implementation. In v2.x it is possible to further adjust this limit via the inflateRawSyncLimit decryption option.

Workarounds

If you cannot upgrade and do not want to support compressed JWEs you may detect and reject these tokens early by checking the token's protected header

const { zip } = jose.decodeProtectedHeader(token)
if (zip !== undefined) {
  throw new Error('JWE Compression is not supported')
}

If you wish to continue supporting JWEs with compressed payloads in these legacy release lines you must upgrade (v1.x and v2.x to version v2.0.7, v3.x and v4.x to version v4.15.5) and review the limits put forth by the patched releases.

For more information

If you have any questions or comments about this advisory please open a discussion in the project's repository


Release Notes

panva/jose (jose)

v4.15.5

Compare Source

v4.15.4

Compare Source

Fixes

v4.15.3

Compare Source

v4.15.2

Compare Source

Fixes
  • build: add a node target for jose-browser-runtime releases (abb63d0)

v4.15.1

Compare Source

Fixes
  • resolve missing types for the cryptoRuntime const (1627965)

v4.15.0

Compare Source

Features
  • export the used crypto runtime as a constant (0681dda)

v4.14.6

Compare Source

Fixes
  • build: publish bundle and umd files with jose-browser-runtime module (62fcbcc), closes #​571

v4.14.5

Compare Source

Refactor
  • catch type error when decoding base64url signature (#​569) (935e920)
  • catch type errors when decoding various base64url strings (9024e87)

v4.14.4

Compare Source

Refactor
  • cleanup NODE-ED25519 workerd workarounds (072e83d)

v4.14.3

Compare Source

Reverts
  • Revert "fix(types): headers and payloads may only be JSON values and primitives" (06d8101), closes #​534

v4.14.2

Compare Source

Fixes
  • types: headers and payloads may only be JSON values and primitives (24f306e)

v4.14.1

Compare Source

v4.14.0

Compare Source

Features
  • add requiredClaims JWT validation option (eeea91d)

v4.13.2

Compare Source

Refactor
  • src/util/decode_protected_header.ts (5716725)

v4.13.1

Compare Source

Fixes
  • workerd: avoid "The script will never generate a response" edge cases completely (96a8c99), closes #​355 #​509

v4.13.0

Compare Source

Features
  • types: allow generics to aid in CryptoKey or KeyObject narrowing of KeyLike (6effa4d)
Fixes
  • make jose.EmbeddedJWK arguments optional (20610a9)

v4.12.2

Compare Source

Fixes
  • types: declare explicit return from EmbeddedJWK (46934ac)

v4.12.1

Compare Source

Refactor
  • clarify when alg is used and required on key imports (19e525f)
  • node: have node:crypto deal with x509 parsing (45bb45d)

v4.12.0

Compare Source

Features
  • enable key iteration over JWKSMultipleMatchingKeys (a278acd)

v4.11.4

Compare Source

Fixes
  • build: ignore deno files in npm publishes (b3d6a11)

v4.11.3

Compare Source

Fixes
  • CF Workers: improve miniflare compat with different Node.js versions, get ready for future non-proprietary support (3406b9f), closes #​446 #​495 #​497

Configuration

📅 Schedule: Branch creation - "" in timezone America/New_York, Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

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

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


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

This PR has been generated by Mend Renovate. View repository job log here.

@cypress-app-bot
Copy link
Collaborator

See the guidelines for reviewing dependency updates for info on how to review dependency update PRs.

@jennifer-shehane jennifer-shehane self-assigned this Mar 7, 2024
@jennifer-shehane jennifer-shehane self-requested a review March 7, 2024 19:58
Copy link
Contributor Author

renovate bot commented Mar 7, 2024

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@jennifer-shehane jennifer-shehane changed the title fix(deps): update dependency jose to v4.15.5 [security] dependency: update dependency jose to v4.15.5 [security] Mar 7, 2024
Copy link

cypress bot commented Mar 7, 2024

1 flaky test on run #54518 ↗︎

0 551 8 0 Flakiness 1

Details:

Merge branch 'develop' into renovate/npm-jose-vulnerability
Project: cypress Commit: 3d918f6800
Status: Passed Duration: 14:18 💡
Started: Mar 13, 2024 6:59 PM Ended: Mar 13, 2024 7:14 PM
Flakiness  cypress/e2e/specs_list_latest_runs.cy.ts • 1 flaky test • app-e2e

View Output

Test Artifacts
App/Cloud Integration - Latest runs and Average duration > when no runs are recorded > shows placeholders for all visible specs Test Replay Screenshots

Review all test suite changes for PR #29086 ↗︎

@jennifer-shehane jennifer-shehane merged commit d98fb36 into develop Mar 13, 2024
80 of 82 checks passed
@jennifer-shehane jennifer-shehane deleted the renovate/npm-jose-vulnerability branch March 13, 2024 21:07
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 21, 2024

Released in 13.7.1.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.7.1, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants