CVE-2025-54887 — Vulnerability in jwe — CVE Details
JWE is missing AES-GCM authentication tag validation in encrypted JWE
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.21%). Schedule for your next planned update.
Does your project use an affected jwe version?
Paste your Gemfile.lock to check it for CVE-2025-54887 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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 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 could have leaked, you must rotate the encryption keys after upgrading to version 1.1.1.
References
Advisory Timeline
- First published August 7, 2025 (476 days ago).
- Last revised August 8, 2025 — 1 day after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install jwe -v 1.1.1
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: RubyGems (1).
| Package | Fixed In |
|---|---|
| jwe RubyGems · Affected: 0.1.0, 0.1.1, 0.2.0, 0.3.0 (+4 more) | 1.1.1 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-354
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.1 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
References
- https://github.com/jwt/ruby-jwe/security/advisories/GHSA-c7p4-hx26-pr73WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-54887ADVISORY
- https://github.com/jwt/ruby-jwe/commit/1e719d79ba3d7aadaa39a2f08c25df077a0f9ff1WEB
- https://github.com/jwt/ruby-jwePACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/jwe/CVE-2025-54887.ymlWEB
Frequently Asked Questions
- What is CVE-2025-54887?
- JWE is missing AES-GCM authentication tag validation in encrypted JWE. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.1/10).
- How do I check if my project is affected by CVE-2025-54887?
- CVE-2025-54887 affects jwe. It has a 0.2% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-54887 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is a below-median EPSS score — only 6.5% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-130001CRITICAL
Mustache for Ruby: RCE using built-in method access
- CVE-2026-122006CRITICAL
Active Storage: Possible arbitrary file write and read in image analysis