{"answers":{"affected":"8 open source packages ship an affected version, including socket.io-parser. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-2421 in the wild and no public exploit code.","fix":"Upgrade socket.io-parser to a fixed version for your release line: 3.3.3, 3.4.2, 4.0.5 or 4.2.1.","what":"CVE-2022-2421 is a critical code injection vulnerability in Socket.io-Parser, published on 25 Oct 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-2421 and fix it if it is affected.\n\nWhat it is: CVE-2022-2421 is a critical code injection vulnerability in Socket.io-Parser, published on 25 Oct 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-2421 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- socket.io-parser (npm): affected all versions; fixed in 3.3.3\n- socket.io-parser (npm): affected all versions; fixed in 3.3.3\n- socket.io-parser (npm): affected from 3.4.0; fixed in 3.4.2\n- socket.io-parser (npm): affected from 3.4.0; fixed in 3.4.2\n- socket.io-parser (npm): affected from 4.0.0; fixed in 4.0.5\n- socket.io-parser (npm): affected from 4.0.0; fixed in 4.0.5\n- socket.io-parser (npm): affected from 4.1.0; fixed in 4.2.1\n- socket.io-parser (npm): affected from 4.1.0; fixed in 4.2.1\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-2421/ (Markdown: https://insights.sbomify.com/CVE-2022-2421/index.md)","id":"CVE-2022-2421","markdown":"https://insights.sbomify.com/CVE-2022-2421/index.md","name":"CVE-2022-2421","record":{"aliases":["GHSA-qm95-pgcg-qqfq"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Socket.io parser library","requires_auth":"none","summary":"Attackers can inject arbitrary function references into query objects via improper type validation in Socket.io parser, potentially leading to code execution.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"DIVD","cpe":[{"product":"socket.io-parser","vendor":"socket"}],"cvss":{"score":10,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"description":"Due to improper type validation in attachment parsing the Socket.io js library, it is possible to overwrite the _placeholder object which allows an attacker to place references to functions at arbitrary places in the resulting query object.","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":"Socket.io - Improper type validation in attachment parsing","id":"CVE-2022-2421","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"code_injection","year":"2022"},"n_packages":8,"n_references":2,"next":{"headline":"Feathers - SQL injection via attribute aliases","id":"CVE-2022-2422"},"packages":[{"ecosystem":"npm","fixed":["3.3.3"],"introduced":["0"],"last_affected":[],"package":"socket.io-parser","purl":null,"source":"GHSA-qm95-pgcg-qqfq"},{"ecosystem":"npm","fixed":["3.3.3"],"introduced":["0"],"last_affected":[],"package":"socket.io-parser","purl":"pkg:npm/socket.io-parser","source":"GHSA-qm95-pgcg-qqfq"},{"ecosystem":"npm","fixed":["3.4.2"],"introduced":["3.4.0"],"last_affected":[],"package":"socket.io-parser","purl":null,"source":"GHSA-qm95-pgcg-qqfq"},{"ecosystem":"npm","fixed":["3.4.2"],"introduced":["3.4.0"],"last_affected":[],"package":"socket.io-parser","purl":"pkg:npm/socket.io-parser","source":"GHSA-qm95-pgcg-qqfq"},{"ecosystem":"npm","fixed":["4.0.5"],"introduced":["4.0.0"],"last_affected":[],"package":"socket.io-parser","purl":null,"source":"GHSA-qm95-pgcg-qqfq"},{"ecosystem":"npm","fixed":["4.0.5"],"introduced":["4.0.0"],"last_affected":[],"package":"socket.io-parser","purl":"pkg:npm/socket.io-parser","source":"GHSA-qm95-pgcg-qqfq"},{"ecosystem":"npm","fixed":["4.2.1"],"introduced":["4.1.0"],"last_affected":[],"package":"socket.io-parser","purl":null,"source":"GHSA-qm95-pgcg-qqfq"},{"ecosystem":"npm","fixed":["4.2.1"],"introduced":["4.1.0"],"last_affected":[],"package":"socket.io-parser","purl":"pkg:npm/socket.io-parser","source":"GHSA-qm95-pgcg-qqfq"}],"prev":{"headline":"URVE Web Manager uploader.php unrestricted upload","id":"CVE-2022-2420"},"products":["Socket.io-Parser"],"published":"2022-10-25","related":[{"cvss_score":8.7,"headline":"socket.io allows an unbounded number of binary attachments","id":"CVE-2026-33151","kev_date_added":null,"published":"2026-03-20"},{"cvss_score":7.5,"headline":"Resource exhaustion in socket.io-parser","id":"CVE-2020-36049","kev_date_added":null,"published":"2021-01-07"},{"cvss_score":7.3,"headline":"Insufficient validation when decoding a Socket.IO packet","id":"CVE-2023-32695","kev_date_added":null,"published":"2023-05-27"}],"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":"yes","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-03-11","vendors":["Socket.io"]},"summary":"Attackers can inject arbitrary function references into query objects via improper type validation in Socket.io parser, potentially leading to code execution.","url":"https://insights.sbomify.com/CVE-2022-2421/"}