CVE-2025-54887 jwe: Missing AES-GCM authentication tag validation in encrypted JWEs
Missing AES-GCM tag validation in the Ruby JWE library allows attackers to decrypt or forge tokens, compromising confidentiality and integrity.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-54887?
CVE-2025-54887 is a critical vulnerability in jwt ruby-jwe, published on 8 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
jwe is a Ruby implementation of the RFC 7516 JSON Web Encryption (JWE) standard. In versions 1.1.0 and below, authentication tags of encrypted JWEs can be brute forced, which may result in loss of confidentiality for those JWEs and provide ways to craft arbitrary JWEs. This puts users at risk because JWEs can be modified to decrypt to an arbitrary value, decrypted by observing parsing differences and the GCM internal GHASH key can be recovered. Users are affected by this vulnerability even if they do not use an AES-GCM encryption algorithm for their JWEs. As the GHASH key may have been leaked, users must rotate the encryption keys after upgrading. This issue is fixed in version 1.1.1.
Weakness: CWE-354
Which versions are affected by CVE-2025-54887?
2 open source packages ship an affected version, including jwe.
| Package | Affected | Fixed in |
|---|---|---|
jwe RubyGems | All versions | 1.1.1 |
jwe RubyGems | All versions | 1.1.1 |
How do I fix CVE-2025-54887?
Upgrade jwe to 1.1.1 or later.
Is CVE-2025-54887 being exploited?
There is no known exploitation of CVE-2025-54887 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Sources
Also known as GHSA-c7p4-hx26-pr73.