{"id":"GHSA-c7p4-hx26-pr73","summary":"JWE is missing AES-GCM authentication tag validation in encrypted JWE","details":"### Overview\nThe 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.\n\n### Impact\n- JWEs can be modified to decrypt to an arbitrary value\n- JWEs can be decrypted by observing parsing differences\n- The GCM internal [GHASH key](https://en.wikipedia.org/wiki/Galois/Counter_Mode#:~:text=\\)%20is%20the-,hash%20key,-%2C%20a%20string%20of) can be recovered\n\n\n### Am I Affected?\nYou are affected by this vulnerability even if you do not use an `AES-GCM` encryption algorithm for your JWEs.\n\n### Patches\nThe version 1.1.1 fixes the issue by adding the tag length check for the `AES-GCM` algorithm.\n\n**Important:** As the [GHASH key](https://en.wikipedia.org/wiki/Galois/Counter_Mode#:~:text=\\)%20is%20the-,hash%20key,-%2C%20a%20string%20of) could have leaked, you must rotate the encryption keys after upgrading to version 1.1.1.\n\n### References\n[Félix Charette talk at NorthSec 2025 about the issue](https://www.youtube.com/watch?v=9IT659uUXfs&t=15830s)","aliases":["CVE-2025-54887"],"modified":"2025-08-08T19:39:11.576065Z","published":"2025-08-07T20:55:35Z","database_specific":{"cwe_ids":["CWE-354"],"severity":"CRITICAL","github_reviewed":true,"github_reviewed_at":"2025-08-07T20:55:35Z","nvd_published_at":"2025-08-08T01:15:25Z"},"references":[{"type":"WEB","url":"https://github.com/jwt/ruby-jwe/security/advisories/GHSA-c7p4-hx26-pr73"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-54887"},{"type":"WEB","url":"https://github.com/jwt/ruby-jwe/commit/1e719d79ba3d7aadaa39a2f08c25df077a0f9ff1"},{"type":"PACKAGE","url":"https://github.com/jwt/ruby-jwe"},{"type":"WEB","url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/jwe/CVE-2025-54887.yml"}],"affected":[{"package":{"name":"jwe","ecosystem":"RubyGems","purl":"pkg:gem/jwe"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.1.1"}]}],"versions":["0.1.0","0.1.1","0.2.0","0.3.0","0.3.1","0.4.0","1.0.0","1.1.0"],"database_specific":{"last_known_affected_version_range":"\u003c= 1.1.0","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/08/GHSA-c7p4-hx26-pr73/GHSA-c7p4-hx26-pr73.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"}]}