CVE-2022-31011: TiDB authentication bypass vulnerability
Noroxi assessment
Priority: Monitor (action score 31/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 0.32% (FIRST EPSS).
- Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: github.com/pingcap/tidb (Go) 0.0.0-20220221072141-27ffd1126da1, 1.1.0-beta.0.20220221072141-27ffd1126da1, 5.3.1.
Low priority for now. Upgrade to github.com/pingcap/tidb (Go) 0.0.0-20220221072141-27ffd1126da1, 1.1.0-beta.0.20220221072141-27ffd1126da1, 5.3.1 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- Published
- May 31, 2022
- Updated
- Jun 17, 2026
- EPSS
- 0.3% · 25th percentile
- CWE
- CWE-287
Report tools
Action score
31
Low priority for now.
- CVSS
- 31 / 40 · 7.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.3%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- 7.8
- CNA · GitHub_M
- 7.8
- agree
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| pingcap | tidb | cpe:2.3:a:pingcap:tidb |
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
pingcap tidb
- = 5.3.0affected
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- pingcap tidb5.3.0
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Go | github.com/pingcap/tidb | from 0.0.0-20210808221113-a7fdc2a05663 · before 0.0.0-20220221072141-27ffd1126da1 | 0.0.0-20220221072141-27ffd1126da1 |
| Go | github.com/pingcap/tidb | from 1.1.0-beta.0.20210808221113-a7fdc2a05663 · before 1.1.0-beta.0.20220221072141-27ffd1126da1 | 1.1.0-beta.0.20220221072141-27ffd1126da1 |
| Go | github.com/pingcap/tidb | from 5.3.0 · before 5.3.1 | 5.3.1 |
Same product
pingcap: all recordsOther highest-scoring records for the same primary product.
- CVE-2024-41433PingCAP TiDB v8.1.0 was discovered to contain a buffer overflow via the component expression.ExplainExpressionList.39Monitor
- CVE-2022-3023Use of Externally-Controlled Format String in pingcap/tidb39Monitor
- CVE-2024-35618PingCAP TiDB v7.5.1 was discovered to contain a NULL pointer dereference via the component SortedRowContainer.30Monitor
Published before and after this one in the same product
- Later →CVE-2022-34969Aug 2, 2022 · PingCAP TiDB v6.1.0 was discovered to contain a NULL pointer dereference.30Monitor
- Later →CVE-2024-33809May 24, 2024 · PingCAP TiDB v7.5.1 was discovered to contain a buffer overflow vulnerability, which could lead to database crashes and denial of service…26Monitor
- Later →CVE-2024-41434Sep 3, 2024 · PingCAP TiDB v8.1.0 was discovered to contain a buffer overflow via the component (*Column).GetDecimal.17Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Go:github.com/pingcap/tidb | 0.0.0-20220221072141-27ffd1126da1 | Package registry (OSV) |
| Go:github.com/pingcap/tidb | 1.1.0-beta.0.20220221072141-27ffd1126da1 | Package registry (OSV) |
| Go:github.com/pingcap/tidb | 5.3.1 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-287 · Improper AuthenticationCVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
nvd-primary
Root cause
Authentication is added route by route instead of being enforced in one place. When a route added later bypasses the shared middleware, the session check never runs for it.
The bug in code
The whole CWE-287 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
app.use("/admin", requireSession, adminRouter);
// Route added later skips the middleware
app.post("/admin-api/config", updateConfig);Fixed
const admin = express.Router();
admin.use(requireSession, requireRole("admin"));
admin.post("/config", updateConfig);
app.use("/admin", admin);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Authentication AbuseCAPEC-114Medium
- Authentication BypassCAPEC-115Medium
- Identity SpoofingCAPEC-151likelihood: Medium · Medium
- Fake the Source of DataCAPEC-194Medium
- Exploiting Trust in ClientCAPEC-22likelihood: High · High
- Utilizing REST's Trust in the System Resource to Obtain Sensitive DataCAPEC-57likelihood: Medium · Very High
- Session HijackingCAPEC-593likelihood: High · Very High
- Token ImpersonationCAPEC-633Medium
ATT&CK techniques
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (1 more)Show less
Vendor advisories and official records. Exploit/PoC links are deliberately left out.