{"answers":{"affected":"6 open source packages ship an affected version, including github.com/lestrrat-go/jwx and github.com/lestrrat-go/jwx/v2. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-21664 exists.","fix":"Upgrade github.com/lestrrat-go/jwx to 1.2.28 or later.","what":"CVE-2024-21664 is a medium-severity vulnerability in lestrrat-go jwx, published on 9 Jan 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-21664 and fix it if it is affected.\n\nWhat it is: CVE-2024-21664 is a medium-severity vulnerability in lestrrat-go jwx, published on 9 Jan 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-21664 exists.\n\nAffected packages and fixed versions:\n- github.com/lestrrat-go/jwx (Go): affected from 1.0.8; fixed in 1.2.28\n- github.com/lestrrat-go/jwx (Go): affected from 1.0.8; fixed in 1.2.28\n- github.com/lestrrat-go/jwx (Go): affected from 1.0.8; fixed in 1.2.28\n- github.com/lestrrat-go/jwx/v2 (Go): affected all versions; fixed in 2.0.19\n- github.com/lestrrat-go/jwx/v2 (Go): affected all versions; fixed in 2.0.19\n- github.com/lestrrat-go/jwx/v2 (Go): affected all versions; fixed in 2.0.19\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-2024-21664/ (Markdown: https://insights.sbomify.com/CVE-2024-21664/index.md)","id":"CVE-2024-21664","markdown":"https://insights.sbomify.com/CVE-2024-21664/index.md","name":"CVE-2024-21664","record":{"aliases":["GHSA-pvcr-v8j8-j5q3","GO-2024-2454","MINI-3w4v-wc8m-6vpm","MINI-6c6p-2vff-7rvf","MINI-7fmq-v75f-gqm3","MINI-cgwv-cgmv-rfwv","MINI-f323-cwp2-26r8","MINI-h59q-7gcq-jwm6","MINI-hmx4-qf7r-vj78","MINI-j2m9-rjw9-j534","MINI-m5g4-r467-qqhr","MINI-q4h3-q26q-7489","MINI-q839-2mv9-jm37","MINI-qcrc-36qj-77hv"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Go JOSE library","requires_auth":"none","summary":"A nil pointer dereference in the jwx Go library allows attackers to crash systems performing JWS verification via crafted JSON payloads.","user_interaction":"required","vuln_class":"null_dereference"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"jwx","vendor":"lestrrat-go"}],"cvss":{"score":4.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L","version":"3.1"},"cwes":[{"id":"CWE-476","name":"NULL Pointer Dereference"}],"description":"jwx is a Go module implementing various JWx (JWA/JWE/JWK/JWS/JWT, otherwise known as JOSE) technologies. Calling `jws.Parse` with a JSON serialized payload where the `signature` field is present while `protected` is absent can lead to a nil pointer dereference. The vulnerability can be used to crash/DOS a system doing JWS verification. This vulnerability has been patched in versions 2.0.19 and 1.2.28.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Parsing JSON serialized payload without protected field can lead to segfault","id":"CVE-2024-21664","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"null_dereference","year":"2024"},"n_packages":6,"n_references":4,"next":{"headline":"Pimcore Ecommerce Framework Bundle Improper Access Control allows unprivileged user to access back-office orders list","id":"CVE-2024-21665"},"packages":[{"ecosystem":"Go","fixed":["1.2.28"],"introduced":["1.0.8"],"last_affected":[],"package":"github.com/lestrrat-go/jwx","purl":null,"source":"GHSA-pvcr-v8j8-j5q3"},{"ecosystem":"Go","fixed":["1.2.28"],"introduced":["1.0.8"],"last_affected":[],"package":"github.com/lestrrat-go/jwx","purl":"pkg:golang/github.com/lestrrat-go/jwx","source":"GHSA-pvcr-v8j8-j5q3"},{"ecosystem":"Go","fixed":["1.2.28"],"introduced":["1.0.8"],"last_affected":[],"package":"github.com/lestrrat-go/jwx","purl":"pkg:golang/github.com/lestrrat-go/jwx","source":"GO-2024-2454"},{"ecosystem":"Go","fixed":["2.0.19"],"introduced":["0"],"last_affected":[],"package":"github.com/lestrrat-go/jwx/v2","purl":null,"source":"GHSA-pvcr-v8j8-j5q3"},{"ecosystem":"Go","fixed":["2.0.19"],"introduced":["0"],"last_affected":[],"package":"github.com/lestrrat-go/jwx/v2","purl":"pkg:golang/github.com/lestrrat-go/jwx/v2","source":"GHSA-pvcr-v8j8-j5q3"},{"ecosystem":"Go","fixed":["2.0.19"],"introduced":["0"],"last_affected":[],"package":"github.com/lestrrat-go/jwx/v2","purl":"pkg:golang/github.com/lestrrat-go/jwx/v2","source":"GO-2024-2454"}],"prev":{"headline":"Remote code execution on ReconServer due to improper input sanitization on the prips command","id":"CVE-2024-21663"},"products":["jwx"],"published":"2024-01-09","related":[{"cvss_score":6.8,"headline":"JWX vulnerable to a denial of service attack using compressed JWE message","id":"CVE-2024-28122","kev_date_added":null,"published":"2024-03-09"},{"cvss_score":5.3,"headline":"Malicious parameters can cause a denial of service in lestrrat-go/jwx","id":"CVE-2023-49290","kev_date_added":null,"published":"2023-12-04"}],"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":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"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":"partial"},"state":"PUBLISHED","updated":"2025-06-17","vendors":["lestrrat-go"]},"summary":"A nil pointer dereference in the jwx Go library allows attackers to crash systems performing JWS verification via crafted JSON payloads.","url":"https://insights.sbomify.com/CVE-2024-21664/"}