{"answers":{"affected":"4 open source packages ship an affected version, including superjson and blitz. It affects 2 products.","exploited":"There is no known exploitation of CVE-2022-23631 in the wild and no public exploit code.","fix":"Upgrade superjson to 1.8.1 or later.","what":"CVE-2022-23631 is a critical vulnerability in blitz-js superjson, published on 9 Feb 2022."},"fix_prompt":"Check this codebase for CVE-2022-23631 and fix it if it is affected.\n\nWhat it is: CVE-2022-23631 is a critical vulnerability in blitz-js superjson, published on 9 Feb 2022. \nExploitation: There is no known exploitation of CVE-2022-23631 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- superjson (npm): affected all versions; fixed in 1.8.1\n- superjson (npm): affected all versions; fixed in 1.8.1\n- blitz (npm): affected all versions; fixed in 0.45.3\n- blitz (npm): affected all versions; fixed in 0.45.3\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-2022-23631/ (Markdown: https://insights.sbomify.com/CVE-2022-23631/index.md)","id":"CVE-2022-23631","markdown":"https://insights.sbomify.com/CVE-2022-23631/index.md","name":"CVE-2022-23631","record":{"aliases":["GHSA-5888-ffcr-r425"],"analysis":null,"analysis_generated_by":null,"assigner":"GitHub_M","cpe":[{"product":"blitz","vendor":"blitzjs"},{"product":"superjson","vendor":"blitzjs"}],"cvss":{"score":9.1,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-1321","name":"Improperly Controlled Modification of Object Prototype Attributes"},{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"description":"superjson is a program to allow JavaScript expressions to be serialized to a superset of JSON. In versions prior to 1.8.1 superjson allows input to run arbitrary code on any server using superjson input without prior authentication or knowledge. The only requirement is that the server implements at least one endpoint which uses superjson during request processing. This has been patched in superjson 1.8.1. Users are advised to update. There are no known workarounds for this issue.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Prototype Pollution leading to Remote Code Execution in superjson","id":"CVE-2022-23631","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":null,"year":"2022"},"n_packages":4,"n_references":3,"next":{"headline":"Traefik skips the router TLS configuration when the host header is an FQDN","id":"CVE-2022-23632"},"packages":[{"ecosystem":"npm","fixed":["0.45.3"],"introduced":["0"],"last_affected":[],"package":"blitz","purl":null,"source":"GHSA-5888-ffcr-r425"},{"ecosystem":"npm","fixed":["0.45.3"],"introduced":["0"],"last_affected":[],"package":"blitz","purl":"pkg:npm/blitz","source":"GHSA-5888-ffcr-r425"},{"ecosystem":"npm","fixed":["1.8.1"],"introduced":["0"],"last_affected":[],"package":"superjson","purl":null,"source":"GHSA-5888-ffcr-r425"},{"ecosystem":"npm","fixed":["1.8.1"],"introduced":["0"],"last_affected":[],"package":"superjson","purl":"pkg:npm/superjson","source":"GHSA-5888-ffcr-r425"}],"prev":{"headline":"Dependency verification bypass in Gradle","id":"CVE-2022-23630"},"products":["superjson"],"published":"2022-02-09","related":[],"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":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["blitz-js"]},"summary":null,"url":"https://insights.sbomify.com/CVE-2022-23631/"}