CVE-2023-51774 json-jwt allows bypass of identity checks via a sign/encryption confusion attack

High 8.4 Published Updated

Attackers can bypass identity checks in the Ruby json-jwt gem by exploiting a sign/encryption confusion vulnerability in JWE handling.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2023-51774?

CVE-2023-51774 is a high-severity authentication bypass vulnerability in n/a, published on 25 Dec 2023. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

The json-jwt (aka JSON::JWT) gem 1.16.3 for Ruby sometimes allows bypass of identity checks via a sign/encryption confusion attack. For example, JWE can sometimes be used to bypass JSON::JWT.decode.

Weakness: CWE-284

Which versions are affected by CVE-2023-51774?

4 open source packages ship an affected version, including json-jwt. It affects 1 product.

PackageAffectedFixed in
json-jwt RubyGemsAll versions1.15.3.1
json-jwt RubyGemsAll versions1.15.3.1
json-jwt RubyGemsFrom 1.16.01.16.6
json-jwt RubyGemsFrom 1.16.01.16.6

Products include Json-Jwt Project Json-Jwt.

How do I fix CVE-2023-51774?

Upgrade json-jwt to a fixed version for your release line: 1.15.3.1 or 1.16.6.

Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.

Is CVE-2023-51774 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-51774 exists.

Sources

Also known as GHSA-c8v6-786g-vjx6, UBUNTU-CVE-2023-51774.

Is CVE-2023-51774 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free