CVE-2023-25330
MyBatis-Plus vulnerable to SQL injection via TenantPlugin
A SQL injection vulnerability in Mybatis plus below 3.5.3.1 allows remote attackers to execute arbitrary SQL commands via the tenant ID valuer. NOTE: the vendor's position is that this can only occur in a misconfigured application; the documentation discusses how to develop applications that avoid SQL injection.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
A SQL injection vulnerability in Mybatis plus below 3.5.3.1 allows remote attackers to execute arbitrary SQL commands via the tenant ID valuer. NOTE: the vendor's position is that this can only occur in a misconfigured application; the documentation discusses how to develop applications that avoid SQL injection.
- Record
CVE-2023-25330- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
CVE List No score
A SQL injection vulnerability in Mybatis plus below 3.5.3.1 allows remote attackers to execute arbitrary SQL commands via the tenant ID valuer. NOTE: the vendor's position is that this can only occur in a misconfigured application; the documentation discusses how to develop applications that avoid SQL injection.
- Record
CVE-2023-25330- Updated
- 2026-11-02
EUVDEUVD-2023-1166 No score
A SQL injection vulnerability in Mybatis plus below 3.5.3.1 allows remote attackers to execute arbitrary SQL commands via the tenant ID valuer. NOTE: the vendor's position is that this can only occur in a misconfigured application; the documentation discusses how to develop applications that avoid SQL injection.
- Record
EUVD-2023-1166- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-32qq-m9fh-f74w
9.8
MyBatis-Plus vulnerable to SQL injection via TenantPlugin
MyBatis-Plus below 3.5.3.1 is vulnerable to SQL injection via the tenant ID value. This may allow remote attackers to execute arbitrary SQL commands.
- Record
GHSA-32qq-m9fh-f74w- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
OSVGHSA-32qq-m9fh-f74w
9.8
MyBatis-Plus vulnerable to SQL injection via TenantPlugin
MyBatis-Plus below 3.5.3.1 is vulnerable to SQL injection via the tenant ID value. This may allow remote attackers to execute arbitrary SQL commands.
- Record
GHSA-32qq-m9fh-f74w- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
OSVOESA-2023-1996
9.8
mybatis security update
The MyBatis data mapper framework makes it easier to use a relational database with object-oriented applications. MyBatis couples objects with stored procedures or SQL statements using a XML descriptor or annotations. Simplicity is the biggest advantage of the MyBatis data mapper over object relational mapping tools. To use the MyBatis data mapper, you rely on your own objects, XML, and SQL. There is little to learn that you don't already know. With the MyBatis data mapper, you have the full power of both SQL and stored procedures at your fingertips. The MyBatis project is developed and maintained by a team that includes the original creators of the "iBATIS" data mapper. The Apache project was retired and continued here.
Security Fix(es):
A SQL injection vulnerability in Mybatis plus below 3.5.3.1 allows remote attackers to execute arbitrary SQL commands via the tenant ID valuer.(CVE-2023-25330)
- Record
OESA-2023-1996- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVOESA-2023-1997
9.8
mybatis security update
The MyBatis data mapper framework makes it easier to use a relational database with object-oriented applications. MyBatis couples objects with stored procedures or SQL statements using a XML descriptor or annotations. Simplicity is the biggest advantage of the MyBatis data mapper over object relational mapping tools. To use the MyBatis data mapper, you rely on your own objects, XML, and SQL. There is little to learn that you don't already know. With the MyBatis data mapper, you have the full power of both SQL and stored procedures at your fingertips. The MyBatis project is developed and maintained by a team that includes the original creators of the "iBATIS" data mapper. The Apache project was retired and continued here.
Security Fix(es):
A SQL injection vulnerability in Mybatis plus below 3.5.3.1 allows remote attackers to execute arbitrary SQL commands via the tenant ID valuer.(CVE-2023-25330)
- Record
OESA-2023-1997- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVOESA-2023-1998
9.8
mybatis security update
The MyBatis data mapper framework makes it easier to use a relational database with object-oriented applications. MyBatis couples objects with stored procedures or SQL statements using a XML descriptor or annotations. Simplicity is the biggest advantage of the MyBatis data mapper over object relational mapping tools. To use the MyBatis data mapper, you rely on your own objects, XML, and SQL. There is little to learn that you don't already know. With the MyBatis data mapper, you have the full power of both SQL and stored procedures at your fingertips. The MyBatis project is developed and maintained by a team that includes the original creators of the "iBATIS" data mapper. The Apache project was retired and continued here.
Security Fix(es):
A SQL injection vulnerability in Mybatis plus below 3.5.3.1 allows remote attackers to execute arbitrary SQL commands via the tenant ID valuer.(CVE-2023-25330)
- Record
OESA-2023-1998- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
com.baomidou:mybatis-plusMaven |
before 3.5.3.1 | 3.5.3.1 |
com.baomidou:mybatis-plusMaven |
before 3.5.3.1, plus listed versions 1.01.11.21.2.11.2.10 Show 45 moreShow less1.2.111.2.121.2.131.2.141.2.151.2.161.2.171.2.181.2.21.2.31.2.41.2.51.2.61.2.81.2.91.3.01.3.11.3.101.3.111.3.21.3.31.3.41.3.51.3.61.3.71.3.81.3.91.4.01.4.11.4.21.4.31.4.41.4.51.4.61.4.71.4.81.4.91.52.02.0-beta2.0-rc2.0.12.0.22.0.32.0.4 |
3.5.3.1 |
mybatisopenEuler:20.03-LTS-SP1 |
before 3.5.8-1.oe1 | 3.5.8-1.oe1 |
mybatisopenEuler:20.03-LTS-SP3 |
before 3.5.8-1.oe1 | 3.5.8-1.oe1 |
mybatisopenEuler:20.03-LTS-SP4 |
before 3.5.8-1.oe2003sp4 | 3.5.8-1.oe2003sp4 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2023-25330 is a critical vulnerability (CVSS 9.8) in Mybatis, published April 5, 2023. Its validity is disputed. EPSS puts the chance of exploitation in the next 30 days at 1.21%, the 68th percentile. Fixed in com.baomidou:mybatis-plus 3.5.3.1.
References
github.com/FCncdn/MybatisPlusTenantPluginSQLInjection-POC/blob/master/Readme.en.md
baomidou.com/reference/about-cve
nvd.nist.gov/vuln/detail/CVE-2023-25330
github.com/advisories/GHSA-32qq-m9fh-f74w
github.com/baomidou/mybatis-plus
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2023-1996
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2023-1997
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2023-1998
Left out here: 59 versions. The JSON record has them.