{"answers":{"affected":"It affects 2 products.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2012-2122 exists.","fix":"Upgrade to a fixed version.","what":"CVE-2012-2122 is a medium-severity authentication bypass vulnerability in Mariadb Mariadb, published on 26 Jun 2012. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2012-2122 and fix it if it is affected.\n\nWhat it is: CVE-2012-2122 is a medium-severity authentication bypass vulnerability in Mariadb Mariadb, published on 26 Jun 2012. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2012-2122 exists.\n\nAffected product: Mariadb Mariadb. No package-level version data is available, so check the vendor advisory linked from the reference page.\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-2012-2122/ (Markdown: https://insights.sbomify.com/CVE-2012-2122/index.md)","id":"CVE-2012-2122","markdown":"https://insights.sbomify.com/CVE-2012-2122/index.md","name":"CVE-2012-2122","record":{"aliases":["GHSA-4qx9-mwf7-7cx8"],"analysis":{"component_type":"database","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":true,"product_category":"MySQL database","requires_auth":"none","summary":"Remote attackers can bypass authentication in MySQL and MariaDB by exploiting a memcmp implementation flaw, allowing unauthorized access without valid credentials.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"redhat","cpe":[{"product":"mariadb","vendor":"mariadb"},{"product":"mysql","vendor":"oracle"}],"cvss":{"score":5.1,"severity":"medium","source":"nvd","vector":"AV:N/AC:H/Au:N/C:P/I:P/A:P","version":"2.0"},"cwes":[{"id":"CWE-287","name":"Improper Authentication"}],"description":"sql/password.c in Oracle MySQL 5.1.x before 5.1.63, 5.5.x before 5.5.24, and 5.6.x before 5.6.6, and MariaDB 5.1.x before 5.1.62, 5.2.x before 5.2.12, 5.3.x before 5.3.6, and 5.5.x before 5.5.23, when running in certain environments with certain implementations of the memcmp function, allows remote attackers to bypass authentication by repeatedly authenticating with the same incorrect password, which eventually causes a token comparison to succeed due to an improperly-checked return value.","ecosystems":[],"exploits":{"exploitdb":1,"first_seen":"2012-06-09","github_poc":5,"max_poc_stars":1,"metasploit":1,"nuclei":1,"refs":[{"date":"2013-05-09T17:11:20Z","kind":"github_poc","ref":"https://github.com/Avinza/CVE-2012-2122-scanner","stars":1,"title":"This is used to scan for CVE-2012-2122 vulnerable servers."},{"date":"2020-06-24T06:26:02Z","kind":"github_poc","ref":"https://github.com/cyberharsh/Oracle-mysql-CVE-2012-2122","stars":1,"title":null},{"date":"2012-06-09","kind":"metasploit","ref":"auxiliary/scanner/mysql/mysql_authbypass_hashdump","stars":null,"title":"MySQL Authentication Bypass Password Dump"},{"date":"2012-06-12","kind":"exploitdb","ref":"19092","stars":null,"title":"MySQL - Authentication Bypass"},{"date":"2023-12-01T09:16:20Z","kind":"github_poc","ref":"https://github.com/zhangkaibin0921/CVE-2012-2122","stars":0,"title":null},{"date":"2025-11-24T07:37:18Z","kind":"github_poc","ref":"https://github.com/netw0rk7/CVE-2012-2122-Home-Lab","stars":0,"title":"CVE-2012-2122 MySQL Authentication Bypass Home Lab"},{"date":"2026-10-08T20:53:29Z","kind":"github_poc","ref":"https://github.com/CyberCTF/vulhub-mysql-cve-2012-2122","stars":0,"title":"Vulhub mysql/CVE-2012-2122: MySQL Authentication Bypass (CVE-2012-2122), run with Isoloom"},{"date":null,"kind":"nuclei","ref":"javascript/cves/2012/CVE-2012-2122.yaml","stars":null,"title":"MySQL - Authentication Bypass"}],"tier":"weaponised"},"has_fix":true,"headline":"Auth bypass in n/a","id":"CVE-2012-2122","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":"mariadb:mariadb","products":["mariadb:mariadb","oracle:mysql"],"type":"auth_bypass","year":"2012"},"n_packages":0,"n_references":11,"next":{"headline":"Security feature bypass in n/a","id":"CVE-2012-2123"},"packages":[],"prev":{"headline":"Denial of service in n/a","id":"CVE-2012-2121"},"products":["n/a"],"published":"2012-06-26","related":[{"cvss_score":10,"headline":"MariaDB server has unsafe parameter handling in `wsrep_notify_cmd`","id":"CVE-2026-49261","kev_date_added":null,"published":"2026-06-11"},{"cvss_score":9.9,"headline":"MariaDB: Out-of-bound buffer write on in `ST_AsText` of nested GeometryCollections","id":"CVE-2026-85746","kev_date_added":null,"published":"2026-10-16"},{"cvss_score":9.9,"headline":"MariaDB: Use-after-free with a large number of SYS_REFCURSOR's","id":"CVE-2026-85748","kev_date_added":null,"published":"2026-10-16"},{"cvss_score":9.9,"headline":"MariaDB: Numerous issues caused by historical #mysql50# tablename encoding bypass.","id":"CVE-2026-92262","kev_date_added":null,"published":"2026-10-16"},{"cvss_score":9.8,"headline":"Code injection in n/a","id":"CVE-2023-26785","kev_date_added":null,"published":"2024-10-17"},{"cvss_score":8.8,"headline":"MariaDB: GRANT PROXY with empty password incorrectly checks grantor's privileges","id":"CVE-2026-97380","kev_date_added":null,"published":"2026-10-16"},{"cvss_score":8.6,"headline":"Heap-based Buffer Overflow in MariaDB","id":"CVE-2026-32710","kev_date_added":null,"published":"2026-03-20"}],"sources":[{"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":"BSD-3-Clause","name":"Metasploit"},{"class":"attribution","licence":"GPL-2.0-or-later","name":"Exploit-DB"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-06","vendors":["n/a"]},"summary":"Remote attackers can bypass authentication in MySQL and MariaDB by exploiting a memcmp implementation flaw, allowing unauthorized access without valid credentials.","url":"https://insights.sbomify.com/CVE-2012-2122/"}