{"answers":{"affected":"6 open source packages ship an affected version, including github.com/pingcap/tidb. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-31011 in the wild and no public exploit code.","fix":"Upgrade github.com/pingcap/tidb to a fixed version for your release line: 0.0.0-20220221072141-27ffd1126da1, 1.1.0-beta.0.20220221072141-27ffd1126da1 or 5.3.1.","what":"CVE-2022-31011 is a high-severity authentication bypass vulnerability in pingcap tidb, published on 31 May 2022. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-31011 and fix it if it is affected.\n\nWhat it is: CVE-2022-31011 is a high-severity authentication bypass vulnerability in pingcap tidb, published on 31 May 2022. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-31011 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/pingcap/tidb (Go): affected from 0.0.0-20210808221113-a7fdc2a05663; fixed in 0.0.0-20220221072141-27ffd1126da1\n- github.com/pingcap/tidb (Go): affected from 0.0.0-20210808221113-a7fdc2a05663; fixed in 0.0.0-20220221072141-27ffd1126da1\n- github.com/pingcap/tidb (Go): affected from 1.1.0-beta.0.20210808221113-a7fdc2a05663; fixed in 1.1.0-beta.0.20220221072141-27ffd1126da1\n- github.com/pingcap/tidb (Go): affected from 1.1.0-beta.0.20210808221113-a7fdc2a05663; fixed in 1.1.0-beta.0.20220221072141-27ffd1126da1\n- github.com/pingcap/tidb (Go): affected from 5.3.0; fixed in 5.3.1\n- github.com/pingcap/tidb (Go): affected from 5.3.0; fixed in 5.3.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-31011/ (Markdown: https://insights.sbomify.com/CVE-2022-31011/index.md)","id":"CVE-2022-31011","markdown":"https://insights.sbomify.com/CVE-2022-31011/index.md","name":"CVE-2022-31011","record":{"aliases":["GHSA-4whx-7p29-mq22"],"analysis":{"component_type":"database","fix_type":"upgrade","impacts":["privilege_escalation","data_read"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"TiDB database","requires_auth":"low_privilege","summary":"Attackers can bypass authentication in TiDB to gain unauthorized access or escalate privileges, requiring specific configuration conditions.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"tidb","vendor":"pingcap"}],"cvss":{"score":7.8,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-287","name":"Improper Authentication"}],"description":"TiDB is an open-source NewSQL database that supports Hybrid Transactional and Analytical Processing (HTAP) workloads. Under certain conditions, an attacker can construct malicious authentication requests to bypass the authentication process, resulting in privilege escalation or unauthorized access. Only users using TiDB 5.3.0 are affected by this vulnerability. TiDB version 5.3.1 contains a patch for this issue. Other mitigation strategies include turning off Security Enhanced Mode (SEM), disabling local login for non-root accounts, and ensuring that the same IP cannot be logged in as root and normal user at the same time.","ecosystems":["Go"],"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":"TiDB authentication bypass vulnerability","id":"CVE-2022-31011","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"auth_bypass","year":"2022"},"n_packages":6,"n_references":2,"next":{"headline":"Git for Windows' installer can be tricked into executing an untrusted binary","id":"CVE-2022-31012"},"packages":[{"ecosystem":"Go","fixed":["0.0.0-20220221072141-27ffd1126da1"],"introduced":["0.0.0-20210808221113-a7fdc2a05663"],"last_affected":[],"package":"github.com/pingcap/tidb","purl":null,"source":"GHSA-4whx-7p29-mq22"},{"ecosystem":"Go","fixed":["0.0.0-20220221072141-27ffd1126da1"],"introduced":["0.0.0-20210808221113-a7fdc2a05663"],"last_affected":[],"package":"github.com/pingcap/tidb","purl":"pkg:golang/github.com/pingcap/tidb","source":"GHSA-4whx-7p29-mq22"},{"ecosystem":"Go","fixed":["1.1.0-beta.0.20220221072141-27ffd1126da1"],"introduced":["1.1.0-beta.0.20210808221113-a7fdc2a05663"],"last_affected":[],"package":"github.com/pingcap/tidb","purl":null,"source":"GHSA-4whx-7p29-mq22"},{"ecosystem":"Go","fixed":["1.1.0-beta.0.20220221072141-27ffd1126da1"],"introduced":["1.1.0-beta.0.20210808221113-a7fdc2a05663"],"last_affected":[],"package":"github.com/pingcap/tidb","purl":"pkg:golang/github.com/pingcap/tidb","source":"GHSA-4whx-7p29-mq22"},{"ecosystem":"Go","fixed":["5.3.1"],"introduced":["5.3.0"],"last_affected":[],"package":"github.com/pingcap/tidb","purl":null,"source":"GHSA-4whx-7p29-mq22"},{"ecosystem":"Go","fixed":["5.3.1"],"introduced":["5.3.0"],"last_affected":[],"package":"github.com/pingcap/tidb","purl":"pkg:golang/github.com/pingcap/tidb","source":"GHSA-4whx-7p29-mq22"}],"prev":{"headline":"DoS vulnerability: Invalid Accent Colors","id":"CVE-2022-31009"},"products":["tidb"],"published":"2022-05-31","related":[{"cvss_score":9.8,"headline":"Memory corruption in n/a","id":"CVE-2024-41433","kev_date_added":null,"published":"2024-09-03"},{"cvss_score":7.5,"headline":"Null dereference in n/a","id":"CVE-2024-35618","kev_date_added":null,"published":"2024-05-24"},{"cvss_score":7.5,"headline":"Null dereference in n/a","id":"CVE-2022-34969","kev_date_added":null,"published":"2022-08-03"},{"cvss_score":6.5,"headline":"Memory corruption in n/a","id":"CVE-2024-33809","kev_date_added":null,"published":"2024-05-24"},{"cvss_score":4.3,"headline":"Denial of service in n/a","id":"CVE-2024-41434","kev_date_added":null,"published":"2024-09-03"},{"cvss_score":4.2,"headline":"Use of Externally-Controlled Format String in pingcap/tidb","id":"CVE-2022-3023","kev_date_added":null,"published":"2022-11-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":"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":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-04-23","vendors":["pingcap"]},"summary":"Attackers can bypass authentication in TiDB to gain unauthorized access or escalate privileges, requiring specific configuration conditions.","url":"https://insights.sbomify.com/CVE-2022-31011/"}