Skip to main content

CVE-2025-54887 — Vulnerability in jwe — CVE Details

CRITICAL

JWE is missing AES-GCM authentication tag validation in encrypted JWE

Published August 7, 2025Updated August 8, 2025Source: OSV

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.

Check my Gemfile.lock

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

Félix Charette talk at NorthSec 2025 about the issue

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.

Bundler
Update jwe to 1.1.1 or later
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).

PackageFixed 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.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

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

CVSS Score
9.1

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
0.21%
EPSS percentile: 6.5

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

GHSA-c7p4-hx26-pr73

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Gemfile.lock