{"answers":{"affected":"2 open source packages ship an affected version, including wordpress and wordpress-multisite. It affects 3 products.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-21661 exists.","fix":"Upgrade wordpress to a fixed version for your release line: 3.7.37, 3.8.37, 3.9.35 or 4.0.34.","what":"CVE-2022-21661 is a high-severity SQL injection vulnerability in Debian Debian Linux, published on 6 Jan 2022. An attacker needs administrator access to exploit it, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-21661 and fix it if it is affected.\n\nWhat it is: CVE-2022-21661 is a high-severity SQL injection vulnerability in Debian Debian Linux, published on 6 Jan 2022. An attacker needs administrator access to exploit it, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-21661 exists.\n\nAffected packages and fixed versions:\n- wordpress (Bitnami): affected from 3.7.0; fixed in 3.7.37, 3.8.37, 3.9.35, 4.0.34, 4.1.34, 4.2.31, 4.3.27, 4.4.26, 4.5.25, 4.6.22, 4.7.22, 4.8.18, 4.9.19, 5.0.15, 5.1.12, 5.2.14, 5.3.11, 5.4.9, 5.5.8, 5.6.7, 5.7.5, 5.8.3\n- wordpress-multisite (Bitnami): affected from 3.7.0; fixed in 3.7.37, 3.8.37, 3.9.35, 4.0.34, 4.1.34, 4.2.31, 4.3.27, 4.4.26, 4.5.25, 4.6.22, 4.7.22, 4.8.18, 4.9.19, 5.0.15, 5.1.12, 5.2.14, 5.3.11, 5.4.9, 5.5.8, 5.6.7, 5.7.5, 5.8.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-21661/ (Markdown: https://insights.sbomify.com/CVE-2022-21661/index.md)","id":"CVE-2022-21661","markdown":"https://insights.sbomify.com/CVE-2022-21661/index.md","name":"CVE-2022-21661","record":{"aliases":["BIT-wordpress-2022-21661","BIT-wordpress-multisite-2022-21661","DEBIAN-CVE-2022-21661","GHSA-6676-cqfm-gw84","UBUNTU-CVE-2022-21661"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"WordPress CMS","requires_auth":"high_privilege","summary":"Attackers can exploit improper sanitization in WP_Query to perform SQL injection, potentially reading or modifying database contents.","user_interaction":"not_required","vuln_class":"sql_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"debian_linux","vendor":"debian"},{"product":"fedora","vendor":"fedoraproject"},{"product":"wordpress","vendor":"wordpress"}],"cvss":{"score":8,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:H/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":"WordPress is a free and open-source content management system written in PHP and paired with a MariaDB database. Due to improper sanitization in WP_Query, there can be cases where SQL injection is possible through plugins or themes that use it in a certain way. This has been patched in WordPress version 5.8.3. Older affected versions are also fixed via security release, that go back till 3.7.37. We strongly recommend that you keep auto-updates enabled. There are no known workarounds for this vulnerability.","ecosystems":["Bitnami"],"exploits":{"exploitdb":1,"first_seen":"2022-01-13","github_poc":13,"max_poc_stars":29,"metasploit":0,"nuclei":1,"refs":[{"date":"2022-07-28T13:12:51Z","kind":"github_poc","ref":"https://github.com/z92g/CVE-2022-21661","stars":29,"title":"WordPress WP_Query SQL Injection POC"},{"date":"2022-02-12T11:31:26Z","kind":"github_poc","ref":"https://github.com/purple-WL/wordpress-CVE-2022-21661","stars":17,"title":null},{"date":"2022-05-28T10:46:48Z","kind":"github_poc","ref":"https://github.com/0x4E0x650x6F/Wordpress-cve-CVE-2022-21661","stars":15,"title":"Wordpress 5.8.2  CVE-2022-21661 Vuln enviroment POC exploit"},{"date":"2022-07-31T11:53:06Z","kind":"github_poc","ref":"https://github.com/guestzz/CVE-2022-21661","stars":7,"title":"CVE-2022-21661 exp for Elementor custom skin."},{"date":"2023-01-13T13:31:34Z","kind":"github_poc","ref":"https://github.com/WellingtonEspindula/SSI-CVE-2022-21661","stars":6,"title":"Study and exploit the vulnerability CVE-2022-21661 that allows SQL Injections through plugins POST requests to WordPress versions below 5.8.3."},{"date":"2023-04-27T00:36:16Z","kind":"github_poc","ref":"https://github.com/sealldeveloper/CVE-2022-21661-PoC","stars":6,"title":"A Python PoC of CVE-2022-21661, inspired from z92g's Go PoC"},{"date":"2023-02-08T04:58:57Z","kind":"github_poc","ref":"https://github.com/daniel616/CVE-2022-21661-Demo","stars":2,"title":"Demonstration of the SQL injection vulnerability in wordpress 5.8.2"},{"date":"2022-01-13","kind":"exploitdb","ref":"50663","stars":null,"title":"WordPress Core 5.8.2 - 'WP_Query' SQL Injection"}],"tier":"weaponised"},"has_fix":true,"headline":"SQL injection in WordPress","id":"CVE-2022-21661","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":"debian:debian_linux","products":["debian:debian_linux","fedoraproject:fedora","wordpress:wordpress"],"type":"sql_injection","year":"2022"},"n_packages":2,"n_references":10,"next":{"headline":"Stored XSS in WordPress","id":"CVE-2022-21662"},"packages":[{"ecosystem":"Bitnami","fixed":["3.7.37","3.8.37","3.9.35","4.0.34","4.1.34","4.2.31","4.3.27","4.4.26","4.5.25","4.6.22","4.7.22","4.8.18","4.9.19","5.0.15","5.1.12","5.2.14","5.3.11","5.4.9","5.5.8","5.6.7","5.7.5","5.8.3"],"introduced":["3.7.0","3.8.0","3.9.0","4.0.0","4.1.0","4.2.0","4.3.0","4.4.0","4.5.0","4.6.0","4.7.0","4.8.0","4.9.0","5.0.0","5.1.0","5.2.0","5.3.0","5.4.0","5.5.0","5.6.0","5.7.0","5.8.0"],"last_affected":[],"package":"wordpress","purl":"pkg:bitnami/wordpress","source":"BIT-wordpress-2022-21661"},{"ecosystem":"Bitnami","fixed":["3.7.37","3.8.37","3.9.35","4.0.34","4.1.34","4.2.31","4.3.27","4.4.26","4.5.25","4.6.22","4.7.22","4.8.18","4.9.19","5.0.15","5.1.12","5.2.14","5.3.11","5.4.9","5.5.8","5.6.7","5.7.5","5.8.3"],"introduced":["3.7.0","3.8.0","3.9.0","4.0.0","4.1.0","4.2.0","4.3.0","4.4.0","4.5.0","4.6.0","4.7.0","4.8.0","4.9.0","5.0.0","5.1.0","5.2.0","5.3.0","5.4.0","5.5.0","5.6.0","5.7.0","5.8.0"],"last_affected":[],"package":"wordpress-multisite","purl":"pkg:bitnami/wordpress-multisite","source":"BIT-wordpress-multisite-2022-21661"}],"prev":{"headline":"Missing authorization in gin-vue-admin","id":"CVE-2022-21660"},"products":["wordpress-develop"],"published":"2022-01-06","related":[{"cvss_score":10,"headline":"ProFTPD Improper Access Control","id":"CVE-2015-3306","kev_date_added":"2026-10-08","published":"2015-05-18"},{"cvss_score":9.9,"headline":"RoundCube Webmail Deserialization of Untrusted Data","id":"CVE-2025-49113","kev_date_added":"2026-02-20","published":"2025-06-02"},{"cvss_score":9.8,"headline":"GNU InetUtils Argument Injection","id":"CVE-2026-24061","kev_date_added":"2026-01-26","published":"2026-01-21"},{"cvss_score":9.8,"headline":"Linux Kernel Improper Check for Unusual or Exceptional Conditions","id":"CVE-2025-39682","kev_date_added":"2026-09-18","published":"2025-09-05"},{"cvss_score":9.8,"headline":"Mozilla Firefox Use-After-Free","id":"CVE-2024-9680","kev_date_added":"2024-10-15","published":"2024-10-09"},{"cvss_score":9.8,"headline":"RARLAB UnRAR Directory Traversal","id":"CVE-2022-30333","kev_date_added":"2022-08-09","published":"2022-05-09"},{"cvss_score":9.8,"headline":"Roundcube Webmail SQL Injection","id":"CVE-2021-44026","kev_date_added":"2023-06-22","published":"2021-11-19"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"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)"},{"class":"attribution","licence":"GPL-2.0-or-later","name":"Exploit-DB"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-09-09","vendors":["WordPress"]},"summary":"Attackers can exploit improper sanitization in WP_Query to perform SQL injection, potentially reading or modifying database contents.","url":"https://insights.sbomify.com/CVE-2022-21661/"}