{"id":"CVE-2022-31011","aliases":["EUVD-2022-5925","GHSA-4whx-7p29-mq22"],"status":"published","title":"TiDB authentication bypass vulnerability","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.","severity":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00323,"percentile":0.25706,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-287"],"published":"2022-05-31T19:30:18Z","modified":"2026-10-28T02:30:41Z","fixes":[{"ecosystem":"Go","package":"github.com/pingcap/tidb","fixed_in":["5.3.1","0.0.0-20220221072141-27ffd1126da1","1.1.0-beta.0.20220221072141-27ffd1126da1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/pingcap/tidb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.3.0"},{"last_affected":"5.3.0"},{"fixed":"5.3.1"}]}],"versions":["5.3.0"]},{"source":"ghsa","ecosystem":"Go","package":"github.com/pingcap/tidb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.0.0-20210808221113-a7fdc2a05663"},{"fixed":"0.0.0-20220221072141-27ffd1126da1"}]}]},{"source":"ghsa","ecosystem":"Go","package":"github.com/pingcap/tidb","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.1.0-beta.0.20210808221113-a7fdc2a05663"},{"fixed":"1.1.0-beta.0.20220221072141-27ffd1126da1"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/pingcap/tidb","ranges":[{"type":"SEMVER","events":[{"introduced":"5.3.0"},{"fixed":"5.3.1"}]}],"versions":["5.3.0"]},{"source":"osv","ecosystem":"Go","package":"github.com/pingcap/tidb","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-20210808221113-a7fdc2a05663"},{"fixed":"0.0.0-20220221072141-27ffd1126da1"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/pingcap/tidb","ranges":[{"type":"SEMVER","events":[{"introduced":"1.1.0-beta.0.20210808221113-a7fdc2a05663"},{"fixed":"1.1.0-beta.0.20220221072141-27ffd1126da1"}]}]}],"products":[{"vendor":"pingcap","product":"tidb"}],"references":[{"url":"https://github.com/pingcap/tidb/security/advisories/GHSA-4whx-7p29-mq22","tags":["x_refsource_CONFIRM","x_transferred","Mitigation","Third Party Advisory","advisory","web"]},{"url":"https://github.com/pingcap/tidb/releases/tag/v5.3.1","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31011","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-4whx-7p29-mq22"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31011.json","tags":["advisory"]},{"url":"https://github.com/pingcap/tidb","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2022-31011","title":"TiDB authentication bypass vulnerability","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.","status":"published","published":"2022-05-31T19:30:18Z","modified":"2025-04-23T18:20:55.933Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-287"],"updated_at":"2026-11-02T14:34:34.940806Z"}],"euvd":[{"id":"EUVD-2022-5925","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.","status":"published","published":"2022-05-31T19:30:18Z","modified":"2025-04-23T18:20:55Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T20:52:08.95736Z"}],"ghsa":[{"id":"GHSA-4whx-7p29-mq22","title":"TiDB authentication bypass vulnerability","description":"### Impact\nUnder certain conditions, an attacker can construct malicious authentication requests to bypass the authentication process, resulting in privilege escalation or unauthorized access.\nOnly users using TiDB 5.3.0 are affected by this vulnerability.\n\n### Patches\nPlease upgrade to TiDB 5.3.1 or higher version\n\n### Workarounds\nYou can also mitigate risks by taking the following measures.\nOption 1: Turn off SEM (Security Enhanced Mode).\nOption 2: Disable local login for non-root accounts and ensure that the same IP cannot be logged in as root or normal user at the same time.\n\n### References\nhttps://en.pingcap.com/download/\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email us at security@tidb.io","status":"published","published":"2022-06-06T21:22:28Z","modified":"2025-07-09T15:49:24Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-287"],"updated_at":"2026-11-02T14:38:49.837727Z"}],"nvd":[{"id":"CVE-2022-31011","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.","status":"published","published":"2022-05-31T20:15:08.1Z","modified":"2026-06-17T04:44:36.047Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":4.6,"vector":"AV:L/AC:L/Au:N/C:P/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-287"],"updated_at":"2026-11-02T14:07:21.261605Z"}],"osv":[{"id":"CVE-2022-31011","title":"TiDB authentication bypass vulnerability","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.","status":"published","published":"2022-05-31T19:30:18Z","modified":"2026-10-28T02:30:41.149942869Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-287"],"updated_at":"2026-11-02T15:44:25.516981Z"},{"id":"GHSA-4whx-7p29-mq22","title":"TiDB authentication bypass vulnerability","description":"### Impact\nUnder certain conditions, an attacker can construct malicious authentication requests to bypass the authentication process, resulting in privilege escalation or unauthorized access.\nOnly users using TiDB 5.3.0 are affected by this vulnerability.\n\n### Patches\nPlease upgrade to TiDB 5.3.1 or higher version\n\n### Workarounds\nYou can also mitigate risks by taking the following measures.\nOption 1: Turn off SEM (Security Enhanced Mode).\nOption 2: Disable local login for non-root accounts and ensure that the same IP cannot be logged in as root or normal user at the same time.\n\n### References\nhttps://en.pingcap.com/download/\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email us at security@tidb.io","status":"published","published":"2022-06-06T21:22:28Z","modified":"2025-07-09T15:49:23Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-287"],"updated_at":"2026-11-02T15:46:37.528068Z"}]}}
