CriticalGHSA-c7p4-hx26-pr73CVE-2025-54887

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

Published 7 Aug 2025 · Updated 8 Aug 2025

Is your project on an affected jwe?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

jweRubyGems
Affected
<1.1.1
Fixed in
1.1.1
Update to the fixed version for your release line, for example:bundle update --conservative jwe # Gemfile: '>= 1.1.1'

Details

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%20is%20the-,hash%20key,-%2C%20a%20string%20of) 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%20is%20the-,hash%20key,-%2C%20a%20string%20of) 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

Is GHSA-c7p4-hx26-pr73 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected jwe, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.