CVE-2026-45363: ruby-jwt Empty-key HMAC Bypass; Cross-language Sibling Vulnerability
HIGHCVE-2026-45363 is a HIGH (CVSS 7.4) empty-key hmac bypass; cross-language sibling vulnerability (CWE-287: Improper Authentication) affecting ruby-jwt libraries in the RubyGems ecosystem. The issue involves empty-key hmac bypass; cross-language sibling of cve-2026-44351. Remediation is available by upgrading affected packages to version 3.2.0, 2.10.3.
CVE-2026-45363 at a Glance
Security Impact
CVSS: 7.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2026-45363
To remediate this vulnerability, upgrade all affected ruby-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 jwt to 3.2.0
Upgrade jwt to 2.10.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for jwt
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-45363, inspect your project dependencies for ruby-jwt:
inspect dependencies for jwt
Analyze the terminal output to locate any version of ruby-jwt in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.0), 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 CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In ruby-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-2026-45363 Affected ruby-jwt Versions
2 component(s)References
Frequently Asked Questions
What is CVE-2026-45363?
Which ruby-jwt versions are affected?
What version fixes CVE-2026-45363?
Is jwt affected?
What is the CVSS score of CVE-2026-45363?
What CWE is associated with CVE-2026-45363?
How can I check RubyGems dependencies for CVE-2026-45363?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c32j-vqhx-rx3x",
"modified" : "2026-06-02T22:12:50Z",
"published" : "2026-05-18T17:24:55Z",
"aliases" : [ "CVE-2026-45363" ],
"summary" : "ruby-jwt: Empty-key HMAC bypass; cross-language sibling of CVE-2026-44351",
"details" : "`JWT.decode(token, '', true, algorithm: 'HS256')` accepts an attacker-forged token.\n`OpenSSL::HMAC.digest('SHA256', '', payload)` returns a valid digest under an empty key, and no `raise\n InvalidKeyError if key.empty?` precondition exists in the HMAC algorithm.\n\n```\nJWT.decode(token, \"\", true, algorithm: 'HS256')\n -> JWA::Hmac.verify(verification_key: \"\", ...)\n -> OpenSSL::HMAC.digest('SHA256', \"\", signing_input) == signature\n```\n\nThe same path is reached when a keyfinder block or key_finder: argument returns \"\", nil, or an\narray containing nil for an unknown key. JWT::Decode#find_key only rejects literal nil and empty\narrays, and JWT::JWA::Hmac silently coerces nil to \"\" (signing_key ||= '') before signing.\n\n```\nJWT.decode(token, nil, true, algorithms: ['HS256']) { |_h| \"\" }\n -> find_key returns \"\" # \"\" && !Array(\"\").empty? == true\n -> JWA::Hmac.verify(verification_key: \"\", ...)\n -> verifies\n```\nCommon application patterns that produce the unsafe value: `redis.get(\"kid:#{kid}\").to_s`, ORM string columns with `default: ''`, `ENV['SECRET'] || '', Hash.new('')` lookups, [primary, fallback] where fallback may be nil. Applications passing a non-empty static key:, or whose keyfinder returns nil / raises on miss, are not affected.\n\nThe existing `enforce_hmac_key_length` option would block this but defaults to false. On OpenSSL ≥ 3.5 the empty-key HMAC.digest call no longer raises, so the OpenSSL-3.0 rescue in JWA::Hmac#sign does not fire.\n\nAffects HS256/HS384/HS512 via both JWT.decode (positional key and block keyfinder) and\n`JWT::EncodedToken#verify_signature!(key_finder:)`",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "jwt"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.2.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "jwt"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.10.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/jwt/ruby-jwt/security/advisories/GHSA-c32j-vqhx-rx3x"
}, {
"type" : "WEB",
"url" : "https://github.com/jwt/ruby-jwt/issues/724"
}, {
"type" : "WEB",
"url" : "https://github.com/jwt/ruby-jwt/commit/db560b769a07bd9724e77ff505011ac01872106f"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jwt/ruby-jwt"
}, {
"type" : "WEB",
"url" : "https://github.com/jwt/ruby-jwt/releases/tag/v2.10.3"
}, {
"type" : "WEB",
"url" : "https://github.com/jwt/ruby-jwt/releases/tag/v3.2.0"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/jwt/CVE-2026-45363.yml"
}, {
"type" : "WEB",
"url" : "https://www.cve.org/CVERecord?id=CVE-2026-45363"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1391", "CWE-287", "CWE-326" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-18T17:24:55Z",
"nvd_published_at" : null
}
}