CVE-2023-51774 is a high-severity (CVSS 8.4) CWE-284 vulnerability in json-jwt. A fix is available for json-jwt — see the affected versions and patch details below.
json-jwt allows bypass of identity checks via a sign/encryption confusion attack
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for CVE-2023-51774.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
json-jwt💎json-jwtReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.
Description
The json-jwt (aka JSON::JWT) gem 1.16.x before 1.16.6, 1.15.x before 1.15.3.1 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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💎RubyGems | json-jwt | ≥ 1.16.0&&< 1.16.6 | 1.16.6bundle update json-jwt --conservative |
| 💎RubyGems | json-jwt | all versions | 1.15.3.1bundle update json-jwt --conservative |
Affected Products
json-jwtjson-jwt_projectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for json-jwt, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update json-jwt to 1.16.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2023-51774 is resolved across your whole dependency graph.
Workarounds
Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.
Frequently Asked Questions
Is CVE-2023-51774 in your dependencies?
Find it across RubyGems, including transitive dependencies.