Miggo Logo

CVE-2025-54887: JWE is missing AES-GCM authentication tag validation in encrypted JWE

9.1

CVSS Score
3.1

Basic Information

EPSS Score
-
Published
8/7/2025
Updated
8/7/2025
KEV Status
No
Technology
TechnologyRuby

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
jwerubygems<= 1.1.01.1.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The security vulnerability is a critical flaw in the JWE decryption process for the AES-GCM encryption algorithm. Specifically, the code failed to validate the length of the authentication tag before using it in the decryption cipher. This omission allows for a practical brute-force attack on the tag. An attacker can submit JWEs with incrementally guessed tags and, by observing the server's responses, can reconstruct the full, valid authentication tag. A successful attack not only allows the decryption of sensitive information but also enables the attacker to recover the internal GHASH key, which grants them the ability to forge arbitrary JWEs that will be accepted as valid. The patch addresses this by introducing a strict length check on the authentication tag within the JWE::Enc::AesGcm.setup_cipher method, which is called by the JWE::Enc::AesGcm.decrypt method, thus closing the vulnerability.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Ov*rvi*w T** *ut**nti**tion t** o* *n*rypt** JW*s **n ** *rut* *or***, w*i** m*y r*sult in loss o* *on*i**nti*lity *or t*os* JW*s *n* provi** w*ys to *r**t *r*itr*ry JW*s. ### Imp**t - JW*s **n ** mo*i*i** to ***rypt to *n *r*itr*ry v*lu* - JW*s

Reasoning

T** s**urity vuln*r**ility is * *riti**l *l*w in t** JW* ***ryption pro**ss *or t** **S-**M *n*ryption *l*orit*m. Sp**i*i**lly, t** *o** **il** to v*li**t* t** l*n*t* o* t** *ut**nti**tion t** ***or* usin* it in t** ***ryption *ip**r. T*is omission *