Vulnerabilities in pkg:gem/jwe
PACKAGECVE-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.
pkg:gem/jwe
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
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).
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.
Upgrade jwe to 1.1.1
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
CVE-2025-54887 Affected Jwe Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jwe
|
RubyGems |
< 1.1.1
|
1.1.1
|
References
Frequently Asked Questions
What is CVE-2025-54887?
Which Jwe versions are affected?
What version fixes CVE-2025-54887?
Is jwe affected?
What is the CVSS score of CVE-2025-54887?
What CWE is associated with CVE-2025-54887?
How can I check RubyGems dependencies for CVE-2025-54887?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}