CVE-2022-31011 TiDB authentication bypass vulnerability

High 7.8 Published Updated

Attackers can bypass authentication in TiDB to gain unauthorized access or escalate privileges, requiring specific configuration conditions.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-31011?

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.

Official 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.

Weakness: CWE-287

Which versions are affected by CVE-2022-31011?

6 open source packages ship an affected version, including github.com/pingcap/tidb. It affects 1 product.

PackageAffectedFixed in
github.com/pingcap/tidb GoFrom 0.0.0-20210808221113-a7fdc2a056630.0.0-20220221072141-27ffd1126da1
github.com/pingcap/tidb GoFrom 0.0.0-20210808221113-a7fdc2a056630.0.0-20220221072141-27ffd1126da1
github.com/pingcap/tidb GoFrom 1.1.0-beta.0.20210808221113-a7fdc2a056631.1.0-beta.0.20220221072141-27ffd1126da1
github.com/pingcap/tidb GoFrom 1.1.0-beta.0.20210808221113-a7fdc2a056631.1.0-beta.0.20220221072141-27ffd1126da1
github.com/pingcap/tidb GoFrom 5.3.05.3.1
github.com/pingcap/tidb GoFrom 5.3.05.3.1

Products include Pingcap Tidb.

How do I fix CVE-2022-31011?

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.

Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.

Is CVE-2022-31011 being exploited?

There is no known exploitation of CVE-2022-31011 in the wild and no public exploit code.

Sources

Also known as GHSA-4whx-7p29-mq22.

Is CVE-2022-31011 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free