Skip to content

← Public intelligence

npm package

jose

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

3 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 5.3npmAmendedPublished

    jose vulnerable to resource exhaustion via specifically crafted JWE with compressed plaintext

    CVE-2024-28176 · GHSA-hhhv-q57g-882q

    Affected
    • npm jose >= 3.0.0, <= 4.15.4; < 2.0.7
    Fixed in
    4.15.52.0.7· Vendor fix available
    Issue
    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…

    Recommended action: Upgrade to 4.15.5 or 2.0.7 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. Medium, CVSS 5.3npmAmendedPublished

    JOSE vulnerable to resource exhaustion via specifically crafted JWE

    CVE-2022-36083 · GHSA-jv3g-j58f-9mq9

    Affected
    • npm jose >= 1.0.0, <= 1.28.1; >= 2.0.0, <= 2.0.5; >= 3.0.0, <= 3.20.3; >= 4.0.0, <= 4.9.1
    Fixed in
    3.20.42.0.64.9.21.28.2· Vendor fix available
    Issue
    The PBKDF2-based JWE key management algorithms expect a JOSE Header Parameter named p2c (PBES2 Count), which determines how many PBKDF2 iterations must be executed in order to derive a CEK wrapping key. The purpose of this parameter is to intentionally slow down the key derivation function in order to make password brute-force and dictionary attacks more expensive. This makes the PBES2 algorithms unsuitable for situations where the JWE is coming from an untrusted source: an adversary can intentionally pick an extremely high PBES2 Count value, that will initiate a CPU-bound computation that may take an unreasonable amount of time to finish. Impact Under certain conditions (see below) it is possible to have the user's environment consume unreasonable amount of CPU time. Affected users The impact is limited only to users utilizing the JWE decryption APIs with symmetric secrets to decrypt JWEs from untrusted parties who do not limit the accepted JWE Key Management Algorithms (alg Header…

    Recommended action: Upgrade to 4.9.2, 3.20.4, 2.0.6 or 1.28.2 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. Medium, CVSS 5.9npmAmendedPublished

    Padding Oracle Attack due to Observable Timing Discrepancy in jose

    CVE-2021-29443 · GHSA-58f5-hfqc-jgch

    Affected
    • npm jose >= 1.0.0, < 1.28.1; >= 2.0.0, < 2.0.5; >= 3.0.0, < 3.11.4
    Fixed in
    3.11.42.0.51.28.1· Vendor fix available
    Issue
    jose is an npm library providing a number of cryptographic operations. Impact AESCBCHMACSHA2 Algorithm (A128CBC-HS256, A192CBC-HS384, A256CBC-HS512) decryption would always execute both HMAC tag verification and CBC decryption, if either failed JWEDecryptionFailed would be thrown. But a possibly observable difference in timing when padding error would occur while decrypting the ciphertext makes a padding oracle and an adversary might be able to make use of that oracle to decrypt data without knowing the decryption key by issuing on average 128b calls to the padding oracle (where b is the number of bytes in the ciphertext block). Patches All major release versions have had a patch released which ensures the HMAC tag is verified before performing CBC decryption. The fixed versions are ^1.28.1 || ^2.0.5 || =3.11.4. Users should upgrade their v1.x dependency to ^1.28.1, their v2.x dependency to ^2.0.5, and their v3.x dependency to ^3.11.4 Credits Thanks to Morgan Brown of Microsoft for…

    Recommended action: Upgrade to 3.11.4, 2.0.5 or 1.28.1 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →