CVE-2025-54887 is a critical-severity (CVSS 9.1) CWE-354 vulnerability in jwe. A fix is available for jwe — see the affected versions and patch details below.
jwe: Missing AES-GCM authentication tag validation in encrypted JWEs
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2025-54887.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
jweReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.
Description
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
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💎RubyGems | jwe | all versions | 1.1.1bundle update jwe --conservative |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for jwe, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update jwe to 1.1.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-54887 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is CVE-2025-54887 in your dependencies?
Find it across RubyGems, including transitive dependencies.