Vulnerabilities in pkg:gem/json-jwt
PACKAGECVE-2023-51774 is a MODERATE json-jwt allows bypass of identity vulnerability (General Security Weakness) affecting Json jwt libraries in the RubyGems ecosystem. The issue involves json-jwt allows bypass of identity checks via a sign/encryption confusion attack. Remediation is available by upgrading affected packages to version 1.16.6, 1.15.3.1.
pkg:gem/json-jwt
Vulnerability advisories affecting package pkg:gem/json-jwt. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-c8v6-786g-vjx6 | CVE-2023-51774 | MODERATE | json-jwt allows bypass of identity checks via a sign/encryption confusion attack |
| GHSA-mj4x-wcxf-hm8x | CVE-2018-1000539 | MODERATE | Json-jwt did not verify the cryptographic signature for data |
| GHSA-cff7-6h4q-q5pj | CVE-2019-18848 | HIGH | JSON-jwt Gem lacked element count during splitting of JWE string |
CVE-2023-51774 at a Glance
How to Fix CVE-2023-51774
To remediate this vulnerability, upgrade all affected Json jwt dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade json-jwt to 1.16.6
Upgrade json-jwt to 1.15.3.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for json-jwt
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-51774, inspect your project dependencies for Json jwt:
inspect dependencies for json-jwt
Analyze the terminal output to locate any version of Json jwt in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.16.6), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Json jwt, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-51774 Affected Json jwt Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
json-jwt
|
RubyGems |
≥ 1.16.0
< 1.16.6
|
1.16.6
|
|
json-jwt
|
RubyGems |
< 1.15.3.1
|
1.15.3.1
|
References
Frequently Asked Questions
What is CVE-2023-51774?
Which Json jwt versions are affected?
What version fixes CVE-2023-51774?
Is json-jwt affected?
What CWE is associated with CVE-2023-51774?
How can I check RubyGems dependencies for CVE-2023-51774?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c8v6-786g-vjx6",
"modified" : "2024-03-06T23:50:38Z",
"published" : "2024-02-29T03:33:14Z",
"aliases" : [ "CVE-2023-51774" ],
"summary" : "json-jwt allows bypass of identity checks via a sign/encryption confusion attack",
"details" : "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.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "json-jwt"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.16.0"
}, {
"fixed" : "1.16.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "json-jwt"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.15.3.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-51774"
}, {
"type" : "WEB",
"url" : "https://github.com/nov/json-jwt/issues/120"
}, {
"type" : "WEB",
"url" : "https://github.com/nov/json-jwt/issues/121"
}, {
"type" : "WEB",
"url" : "https://github.com/nov/json-jwt/commit/593ea8bcaf2629048bad8c036191f2da0a2e713c"
}, {
"type" : "WEB",
"url" : "https://github.com/nov/json-jwt/commit/9c4d842a9465bd7960570ca326c3de79b4abc9d0"
}, {
"type" : "WEB",
"url" : "https://github.com/P3ngu1nW/CVE_Request/blob/main/novjson-jwt.md"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/nov/json-jwt"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/json-jwt/CVE-2023-51774.yml"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-03-01T16:56:21Z",
"nvd_published_at" : "2024-02-29T01:42:05Z"
}
}