Vulnerabilities in pkg:gem/jwe

PACKAGE
Advisory Identifier: GHSA-c7p4-hx26-pr73
Advisory Summary

CVE-2025-54887 is a CRITICAL (CVSS 9.1) jwe is missing aes-gcm authentication vulnerability (CWE-354: Improper Validation of Integrity Check Value) affecting Jwe libraries in the RubyGems ecosystem. The issue involves jwe is missing aes-gcm authentication tag validation in encrypted jwe. Remediation is available by upgrading affected packages to version 1.1.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/jwe

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:gem/jwe. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-c7p4-hx26-pr73 CVE-2025-54887 CRITICAL JWE is missing AES-GCM authentication tag validation in encrypted JWE

CVE-2025-54887 at a Glance

CVE Identifier CVE-2025-54887
GHSA Identifier GHSA-c7p4-hx26-pr73
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-354: Improper Validation of Integrity Check Value
Affected Product Jwe
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 9.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2025-54887

To remediate this vulnerability, upgrade all affected Jwe dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

jwe fixed: 1.1.1
Upgrade jwe to 1.1.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for jwe

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-54887, inspect your project dependencies for Jwe:

inspect dependencies for jwe

Analyze the terminal output to locate any version of Jwe in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-354: Improper Validation of Integrity Check Value, where the product does not validate or incorrectly validates the integrity check values or "checksums" of a message. this may prevent it from detecting if the data has been modified or corrupted in transmission. In Jwe, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Overview The authentication tag of encrypted JWEs can be brute forced, which may result in loss of confidentiality for those JWEs and provide ways to craft arbitrary JWEs. ### Impact - JWEs can be modified to decrypt to an arbitrary value - JWEs can be decrypted by observing parsing differences - The GCM internal [GHASH key](https://en.wikipedia.org/wiki/Galois/Counter_Mode#:~:text=\)%20is%20the-,hash%20key,-%2C%20a%20string%20of) can be recovered ### Am I Affected? You are affected by this vulnerability even if you do not use an `AES-GCM` encryption algorithm for your JWEs. ### Patches The version 1.1.1 fixes the issue by adding the tag length check for the `AES-GCM` algorithm. **Important:** As the [GHASH key](https://en.wikipedia.org/wiki/Galois/Counter_Mode#:~:text=\)%20is%20the-,hash%20key,-%2C%20a%20string%20of) could have leaked, you must rotate the encryption keys after upgrading to version 1.1.1. ### References [Félix Charette talk at NorthSec 2025 about the issue](https://www.youtube.com/watch?v=9IT659uUXfs&t=15830s)

CVE-2025-54887 Affected Jwe Versions

1 component(s)
Fixed Versions:
1.1.1
Product / Package Ecosystem Affected Versions Fixed Version
jwe
RubyGems
< 1.1.1
1.1.1

References

Frequently Asked Questions

What is CVE-2025-54887?
CVE-2025-54887 is a security vulnerability in Jwe involving JWE is missing AES-GCM authentication tag validation in encrypted JWE under CWE-354: Improper Validation of Integrity Check Value.
Which Jwe versions are affected?
Affected versions include releases prior to 1.1.1 across affected packages: jwe.
What version fixes CVE-2025-54887?
Upgrading to 1.1.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jwe affected?
Yes, jwe is affected in releases prior to 1.1.1. Upgrade your dependency to 1.1.1 or later.
What is the CVSS score of CVE-2025-54887?
CVE-2025-54887 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2025-54887?
CVE-2025-54887 is classified under CWE-354: Improper Validation of Integrity Check Value (The product does not validate or incorrectly validates the integrity check values or "checksums" of a message. This may prevent it from detecting if the data has been modified or corrupted in transmission.).
How can I check RubyGems dependencies for CVE-2025-54887?
Run the dependency tree command: 'inspect dependencies for jwe'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-c7p4-hx26-pr73",
  "modified" : "2025-08-08T19:30:00Z",
  "published" : "2025-08-07T20:55:35Z",
  "aliases" : [ "CVE-2025-54887" ],
  "summary" : "JWE is missing AES-GCM authentication tag validation in encrypted JWE",
  "details" : "### Overview\nThe authentication tag of encrypted JWEs can be brute forced, which may result in loss of confidentiality for those JWEs and provide ways to craft arbitrary JWEs.\n\n### Impact\n- JWEs can be modified to decrypt to an arbitrary value\n- JWEs can be decrypted by observing parsing differences\n- The GCM internal [GHASH key](https://en.wikipedia.org/wiki/Galois/Counter_Mode#:~:text=\\)%20is%20the-,hash%20key,-%2C%20a%20string%20of) can be recovered\n\n\n### Am I Affected?\nYou are affected by this vulnerability even if you do not use an `AES-GCM` encryption algorithm for your JWEs.\n\n### Patches\nThe version 1.1.1 fixes the issue by adding the tag length check for the `AES-GCM` algorithm.\n\n**Important:** As the [GHASH key](https://en.wikipedia.org/wiki/Galois/Counter_Mode#:~:text=\\)%20is%20the-,hash%20key,-%2C%20a%20string%20of) could have leaked, you must rotate the encryption keys after upgrading to version 1.1.1.\n\n### References\n[Félix Charette talk at NorthSec 2025 about the issue](https://www.youtube.com/watch?v=9IT659uUXfs&t=15830s)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "jwe"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.1.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.1.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jwt/ruby-jwe/security/advisories/GHSA-c7p4-hx26-pr73"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-54887"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jwt/ruby-jwe/commit/1e719d79ba3d7aadaa39a2f08c25df077a0f9ff1"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jwt/ruby-jwe"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/jwe/CVE-2025-54887.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-354" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-08-07T20:55:35Z",
    "nvd_published_at" : "2025-08-08T01:15:25Z"
  }
}