The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2023-25330

CVE-2023-25330: Mybatis Plus SQL Injection Vulnerability

CVE-2023-25330 is a SQL injection vulnerability in Mybatis Plus that allows attackers to execute arbitrary SQL commands via tenant ID values. This article covers technical details, affected versions, and mitigation strategies.

Published: February 11, 2026

CVE-2023-25330 Overview

CVE-2023-25330 is a SQL injection vulnerability affecting MyBatis Plus versions below 3.5.3.1. The vulnerability allows remote attackers to execute arbitrary SQL commands via the tenant ID value within the TenantPlugin component. It should be noted that the vendor's position is that this vulnerability can only occur in misconfigured applications, and their documentation provides guidance on developing applications that avoid SQL injection.

Critical Impact

Remote attackers can execute arbitrary SQL commands without authentication, potentially leading to complete database compromise, data exfiltration, modification, or destruction.

Affected Products

  • MyBatis Plus versions below 3.5.3.1
  • Applications using the TenantPlugin with improper configuration
  • MyBatis MyBatis (all vulnerable versions)

Discovery Timeline

  • 2023-04-05 - CVE-2023-25330 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2023-25330

Vulnerability Analysis

This SQL injection vulnerability (CWE-89) resides in the tenant ID handling mechanism of MyBatis Plus's TenantPlugin feature. When applications implement multi-tenancy using MyBatis Plus without proper input validation, the tenant ID parameter becomes susceptible to SQL injection attacks. The vulnerability allows attackers to inject malicious SQL commands through the tenant ID value, which is then executed against the underlying database without proper sanitization.

The attack can be executed remotely over the network and requires no authentication or user interaction, making it particularly dangerous for exposed applications. Successful exploitation can result in unauthorized access to sensitive data, data manipulation, and potentially complete compromise of the database server.

Root Cause

The root cause of this vulnerability lies in the improper handling of the tenant ID value within the TenantPlugin component. When the tenant ID is dynamically constructed and injected into SQL queries without adequate parameterization or input validation, it creates an injection point that attackers can exploit. The vendor acknowledges this as a misconfiguration issue, emphasizing that proper implementation following their documentation guidelines would prevent this vulnerability.

Attack Vector

The attack vector is network-based, allowing remote attackers to exploit the vulnerability by manipulating the tenant ID parameter in requests to affected applications. The attacker injects malicious SQL syntax into the tenant ID field, which bypasses input validation (when improperly configured) and executes arbitrary SQL commands in the context of the database user.

The vulnerability exploitation involves crafting a malicious tenant ID value containing SQL injection payloads. When the application processes this value through the TenantPlugin, the injected SQL is concatenated into the query and executed. This can allow attackers to perform operations such as extracting sensitive data, modifying records, or even executing administrative database commands depending on the database user's privileges.

For detailed technical analysis and proof-of-concept information, refer to the GitHub MybatisPlus SQL Injection PoC.

Detection Methods for CVE-2023-25330

Indicators of Compromise

  • Unusual or malformed tenant ID values in application logs containing SQL syntax such as UNION, SELECT, DROP, or single quotes
  • Database query errors indicating SQL syntax problems potentially caused by injection attempts
  • Unexpected database queries or data access patterns not matching normal application behavior
  • Evidence of data exfiltration or unauthorized bulk data retrieval from database audit logs

Detection Strategies

  • Implement Web Application Firewall (WAF) rules to detect SQL injection patterns in request parameters, specifically targeting tenant ID fields
  • Deploy database activity monitoring to identify anomalous queries or access patterns indicative of SQL injection exploitation
  • Configure application logging to capture and alert on suspicious tenant ID values containing special characters or SQL keywords
  • Utilize SentinelOne Singularity Platform to monitor for post-exploitation activities and lateral movement following database compromise

Monitoring Recommendations

  • Enable detailed SQL query logging on database servers to track all executed statements
  • Monitor application error logs for SQL syntax errors that may indicate injection attempts
  • Implement real-time alerting for authentication failures and unusual database access patterns
  • Review database audit trails regularly for evidence of unauthorized data access or modification

How to Mitigate CVE-2023-25330

Immediate Actions Required

  • Upgrade MyBatis Plus to version 3.5.3.1 or later immediately
  • Review application code to ensure tenant ID values are properly validated and parameterized
  • Implement input validation to reject tenant ID values containing SQL syntax or special characters
  • Follow the vendor's security guidelines as documented in the Baomidou CVE Reference

Patch Information

The vulnerability is addressed in MyBatis Plus version 3.5.3.1 and later. Organizations should upgrade to the latest stable version to receive this fix along with any additional security improvements. The vendor has published guidance on proper implementation to avoid this class of vulnerabilities, available at their official security documentation.

Workarounds

  • Implement strict input validation on all tenant ID parameters, rejecting any values containing SQL metacharacters such as single quotes, semicolons, or SQL keywords
  • Use parameterized queries throughout the application to ensure tenant ID values cannot be interpreted as SQL commands
  • Apply network-level controls to limit access to affected applications while remediation is in progress
  • Configure database user permissions following the principle of least privilege to minimize the impact of potential exploitation
bash
# Configuration example - Validate tenant ID input before use
# Ensure tenant IDs are alphanumeric only
# Example validation regex pattern: ^[a-zA-Z0-9_-]+$
# 
# In MyBatis Plus configuration, implement TenantLineHandler
# with proper input sanitization:
# - Validate tenant ID format before processing
# - Use parameterized queries for all database operations
# - Follow vendor security guidelines at baomidou.com

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechMybatis

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.61%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-89
  • Technical References
  • Baomidou CVE Reference

  • GitHub MybatisPlus SQL Injection PoC
  • Related CVEs
  • CVE-2020-26945: MyBatis Deserialization Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English