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
    • Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-2022-25517

CVE-2022-25517: Baomidou Mybatis-plus SQLi Vulnerability

CVE-2022-25517 is a SQL injection flaw in Baomidou Mybatis-plus v3.4.3 affecting the Column parameter in AbstractWrapper.java. This article covers the technical details, affected versions, security impact, and mitigation.

Published: February 11, 2026

CVE-2022-25517 Overview

CVE-2022-25517 is a SQL Injection vulnerability affecting MyBatis Plus v3.4.3, a popular persistence framework enhancement for Java applications. The vulnerability exists in the Column parameter handling within /core/conditions/AbstractWrapper.java, which allows attackers to inject malicious SQL statements through unsanitized input. It is important to note that the vendor's position is that the reported execution of SQL statements was intended behavior, which may indicate this is considered a framework design characteristic rather than a security flaw.

Critical Impact

This SQL Injection vulnerability allows unauthenticated remote attackers to execute arbitrary SQL commands against the underlying database, potentially leading to complete compromise of data confidentiality, integrity, and availability.

Affected Products

  • Baomidou MyBatis-Plus version 3.4.3
  • Applications using the AbstractWrapper class with user-controlled Column parameters
  • Java applications integrating the vulnerable MyBatis-Plus version

Discovery Timeline

  • 2022-03-22 - CVE-2022-25517 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-25517

Vulnerability Analysis

This SQL Injection vulnerability resides in the AbstractWrapper.java class within the MyBatis-Plus framework's core conditions handling module. The vulnerability occurs when user-controlled input is passed directly to the Column parameter without proper sanitization or parameterized query handling. SQL Injection vulnerabilities of this nature allow attackers to manipulate database queries by injecting malicious SQL code through application inputs.

MyBatis-Plus is designed to simplify database operations in Java applications by providing an enhanced layer over MyBatis. However, when the Column parameter in the AbstractWrapper class accepts unsanitized user input, attackers can craft specially designed input strings that alter the intended SQL query structure, potentially allowing unauthorized data access, modification, or deletion.

Root Cause

The root cause of this vulnerability lies in insufficient input validation and improper handling of the Column parameter in the AbstractWrapper.java class. When developers use this wrapper class with dynamic column names derived from user input, the framework does not adequately sanitize or escape these values before incorporating them into SQL statements. This creates an injection point where malicious SQL fragments can be concatenated into the final query.

Attack Vector

The attack vector for CVE-2022-25517 is network-based, requiring no authentication or user interaction. An attacker can exploit this vulnerability by sending specially crafted HTTP requests to an application that uses the vulnerable MyBatis-Plus component. The malicious payload is passed through the Column parameter, which is then incorporated directly into SQL queries without proper sanitization.

The vulnerability allows attackers to potentially:

  • Extract sensitive data from the database through UNION-based or blind SQL injection techniques
  • Modify or delete database records
  • Execute administrative database operations
  • In some configurations, potentially achieve command execution on the underlying system

Technical details and proof-of-concept demonstrations can be found in the GitHub PoC Repository and the related GitHub Issue Discussion.

Detection Methods for CVE-2022-25517

Indicators of Compromise

  • Unusual SQL error messages in application logs indicating syntax errors from malformed injection attempts
  • Database audit logs showing unexpected or anomalous query patterns, especially queries with UNION SELECT statements or multiple statement terminators
  • HTTP request logs containing SQL keywords or special characters in parameters that map to MyBatis-Plus wrapper operations
  • Unexpected database query execution times indicating time-based blind SQL injection probing

Detection Strategies

  • Implement Web Application Firewall (WAF) rules to detect and block common SQL injection patterns in request parameters
  • Enable detailed logging on database servers to capture all executed queries for forensic analysis
  • Deploy application-level monitoring to detect anomalous patterns in MyBatis-Plus wrapper method invocations
  • Utilize SIEM solutions to correlate web server logs with database activity for identifying potential exploitation attempts

Monitoring Recommendations

  • Configure real-time alerting for SQL error exceptions in application logs that may indicate injection attempts
  • Monitor for unusual database query patterns, particularly those involving system tables or administrative functions
  • Implement rate limiting and anomaly detection on endpoints that utilize dynamic query building with MyBatis-Plus
  • Review database privilege usage patterns to detect potential privilege escalation following successful injection

How to Mitigate CVE-2022-25517

Immediate Actions Required

  • Audit all code paths that use AbstractWrapper class methods with user-supplied input for the Column parameter
  • Implement a whitelist approach for column names, validating that user input matches only expected column identifiers
  • Apply input validation to reject any input containing SQL metacharacters or keywords before passing to MyBatis-Plus methods
  • Consider upgrading to a newer version of MyBatis-Plus if the vendor has released updates addressing this behavior

Patch Information

The vendor's position is that the reported SQL statement execution was intended behavior. As such, no official security patch has been released specifically for this CVE. Organizations using MyBatis-Plus should implement application-level controls to prevent SQL injection through this vector. Refer to the GitHub Issue Discussion for ongoing community discussion and potential workarounds.

Workarounds

  • Implement strict input validation using a whitelist of allowed column names before passing any user input to MyBatis-Plus wrapper methods
  • Use parameterized queries or prepared statements for any dynamic SQL operations where possible
  • Apply the principle of least privilege to database accounts used by the application to limit potential impact
  • Deploy a Web Application Firewall with SQL injection detection rules as an additional layer of defense
bash
# Example column whitelist validation approach
# In your application, validate column names before use:
ALLOWED_COLUMNS="id,name,email,status,created_at,updated_at"

# Ensure user-supplied column parameter matches whitelist
# Reject any input not in the allowed list
# This prevents injection of arbitrary SQL through column parameters

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

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechMybatis Plus

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.36%

  • 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
  • GitHub PoC Repository

  • GitHub Issue Discussion
  • Latest CVEs
  • CVE-2025-9185: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9184: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9180: Mozilla Firefox Auth Bypass Vulnerability

  • CVE-2025-8030: Mozilla Firefox RCE Vulnerability
Default Legacy - Prefooter | 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