{"answers":{"affected":"4 open source packages ship an affected version, including json-jwt. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-51774 exists.","fix":"Upgrade json-jwt to a fixed version for your release line: 1.15.3.1 or 1.16.6.","what":"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."},"fix_prompt":"Check this codebase for CVE-2023-51774 and fix it if it is affected.\n\nWhat it is: 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.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-51774 exists.\n\nAffected packages and fixed versions:\n- json-jwt (RubyGems): affected all versions; fixed in 1.15.3.1\n- json-jwt (RubyGems): affected all versions; fixed in 1.15.3.1\n- json-jwt (RubyGems): affected from 1.16.0; fixed in 1.16.6\n- json-jwt (RubyGems): affected from 1.16.0; fixed in 1.16.6\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-51774/ (Markdown: https://insights.sbomify.com/CVE-2023-51774/index.md)","id":"CVE-2023-51774","markdown":"https://insights.sbomify.com/CVE-2023-51774/index.md","name":"CVE-2023-51774","record":{"aliases":["GHSA-c8v6-786g-vjx6","UBUNTU-CVE-2023-51774"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Ruby JWT library","requires_auth":"none","summary":"Attackers can bypass identity checks in the Ruby json-jwt gem by exploiting a sign/encryption confusion vulnerability in JWE handling.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"json-jwt","vendor":"json-jwt_project"}],"cvss":{"score":8.4,"severity":"high","source":"cisa-adp","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-284","name":"Improper Access Control"}],"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.","ecosystems":["RubyGems"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"json-jwt allows bypass of identity checks via a sign/encryption confusion attack","id":"CVE-2023-51774","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"RubyGems","product":null,"products":[],"type":"auth_bypass","year":"2023"},"n_packages":4,"n_references":1,"next":{"headline":"jose4j denial of service via specifically crafted JWE","id":"CVE-2023-51775"},"packages":[{"ecosystem":"RubyGems","fixed":["1.15.3.1"],"introduced":["0"],"last_affected":[],"package":"json-jwt","purl":null,"source":"GHSA-c8v6-786g-vjx6"},{"ecosystem":"RubyGems","fixed":["1.15.3.1"],"introduced":["0"],"last_affected":[],"package":"json-jwt","purl":"pkg:gem/json-jwt","source":"GHSA-c8v6-786g-vjx6"},{"ecosystem":"RubyGems","fixed":["1.16.6"],"introduced":["1.16.0"],"last_affected":[],"package":"json-jwt","purl":null,"source":"GHSA-c8v6-786g-vjx6"},{"ecosystem":"RubyGems","fixed":["1.16.6"],"introduced":["1.16.0"],"last_affected":[],"package":"json-jwt","purl":"pkg:gem/json-jwt","source":"GHSA-c8v6-786g-vjx6"}],"prev":{"headline":"Memory corruption in n/a","id":"CVE-2023-51773"},"products":["n/a"],"published":"2023-12-25","related":[{"cvss_score":5.3,"headline":"Json-jwt did not verify the cryptographic signature for data","id":"CVE-2018-1000539","kev_date_added":null,"published":"2018-06-26"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-08-26","vendors":["n/a"]},"summary":"Attackers can bypass identity checks in the Ruby json-jwt gem by exploiting a sign/encryption confusion vulnerability in JWE handling.","url":"https://insights.sbomify.com/CVE-2023-51774/"}