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-25813

CVE-2023-25813: Sequelize ORM SQL Injection Vulnerability

CVE-2023-25813 is a SQL injection vulnerability in Sequelize, a Node.js ORM tool, caused by improper escaping of replacement parameters. This article covers the technical details, affected versions, and mitigation steps.

Published: February 4, 2026

CVE-2023-25813 Overview

CVE-2023-25813 is a SQL Injection vulnerability affecting Sequelize, a popular Node.js Object-Relational Mapping (ORM) tool. In versions prior to 6.19.1, parameters passed through the replacements option are not properly escaped, allowing attackers to inject arbitrary SQL commands depending on the specific queries in use. This vulnerability can lead to unauthorized data access, data manipulation, or complete database compromise.

Critical Impact

Unauthenticated attackers can exploit improper escaping in the replacements parameter to execute arbitrary SQL commands, potentially leading to full database compromise, data exfiltration, or data manipulation.

Affected Products

  • Sequelize versions prior to 6.19.1
  • Node.js applications using vulnerable Sequelize ORM
  • sequelizejs sequelize

Discovery Timeline

  • 2023-02-22 - CVE CVE-2023-25813 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2023-25813

Vulnerability Analysis

This SQL Injection vulnerability stems from improper input sanitization in Sequelize's replacement parameter handling. When developers use the replacements option in combination with the where clause in Sequelize queries, user-supplied values are not properly escaped before being interpolated into SQL statements. This allows an attacker to craft malicious input that breaks out of the intended query context and executes arbitrary SQL commands.

The vulnerability is particularly dangerous because Sequelize is widely used in Node.js applications as a database abstraction layer. Developers often trust the ORM to handle escaping automatically, making this type of vulnerability unexpected. The network-accessible attack vector means any application exposing Sequelize-backed endpoints to the internet is potentially at risk without requiring authentication or user interaction.

Root Cause

The root cause of CVE-2023-25813 lies in how Sequelize handles :replacements placeholders within SQL query strings. Prior to the fix, the replacement logic would substitute placeholders even when they appeared inside string literals, allowing attackers to inject SQL syntax through carefully crafted replacement values. The fix introduced the injectReplacements utility function that properly identifies and protects string boundaries, ensuring replacements only occur in safe contexts outside of quoted strings.

Attack Vector

The vulnerability is exploitable over the network by any attacker who can influence the values passed to Sequelize queries using the replacements option. Attack scenarios include:

  1. Web forms or API endpoints that accept user input and use it in Sequelize queries with replacements
  2. Search functionality where user-supplied terms are passed through replacement parameters
  3. Any dynamic query construction that combines replacements with the where option

An attacker can inject SQL metacharacters that escape the intended value context and append additional SQL commands, enabling data extraction, modification, or deletion.

The security patch addressed this by adding proper string boundary detection:

typescript
+import type { Dialect } from '../../sequelize.js';
+import type { AbstractQuery } from './query.js';
+
+export declare type DialectSupports = {
+  'DEFAULT': boolean;
+  'DEFAULT VALUES': boolean;
+  'VALUES ()': boolean;
+  'LIMIT ON UPDATE': boolean;
+  'ON DUPLICATE KEY': boolean;
+  'ORDER NULLS': boolean;
+  'UNION': boolean;
+  'UNION ALL': boolean;
+  'RIGHT JOIN': boolean;
+  EXCEPTION: boolean;
+  forShare?: 'LOCK IN SHARE MODE' | 'FOR SHARE' | undefined;
+  lock: boolean;
+  lockOf: boolean;
+  lockKey: boolean;
+  lockOuterJoinFailure: boolean;
+  skipLocked: boolean;
+  finalTable: boolean;
+  returnValues: false | {
+    output: boolean;
+    returning: boolean;
+  };
+  autoIncrement: {
+    identityInsert: boolean;
+    defaultValue: boolean;
+    update: boolean;
+  };

Source: GitHub Commit Update

The fix also introduced the injectReplacements utility:

javascript
 const HasOne = require('./associations/has-one');
 const { BelongsToMany } = require('./associations/belongs-to-many');
 const { HasMany } = require('./associations/has-many');
+const { injectReplacements } = require('./utils/sql');
 
 /**
  * This is the main class, the entry point to sequelize.

Source: GitHub Commit Update

Detection Methods for CVE-2023-25813

Indicators of Compromise

  • Unusual database query patterns containing SQL metacharacters like single quotes, semicolons, or UNION statements
  • Error logs showing SQL syntax errors from malformed injection attempts
  • Unexpected database access patterns or data exfiltration activity
  • Application logs containing suspicious input patterns targeting replacement parameters

Detection Strategies

  • Implement Web Application Firewall (WAF) rules to detect SQL injection patterns in HTTP request parameters
  • Enable detailed logging for all Sequelize queries and monitor for anomalous patterns
  • Use database activity monitoring to identify unauthorized data access or modification attempts
  • Deploy runtime application self-protection (RASP) solutions to detect and block SQL injection at the application layer

Monitoring Recommendations

  • Monitor application logs for SQL syntax errors that may indicate injection attempts
  • Set up alerts for unusual database query volumes or patterns
  • Track dependency versions across your Node.js applications to identify vulnerable Sequelize installations
  • Implement npm audit or similar tools in CI/CD pipelines to catch vulnerable dependencies

How to Mitigate CVE-2023-25813

Immediate Actions Required

  • Upgrade Sequelize to version 6.19.1 or later immediately
  • Audit all application code for usage of replacements combined with where options in Sequelize queries
  • Implement input validation and sanitization as a defense-in-depth measure
  • Review database access logs for signs of exploitation

Patch Information

The vulnerability has been fixed in Sequelize version 6.19.1. Users should upgrade to this version or later to remediate the vulnerability. The fix is available through npm and can be applied by updating the package dependency. For more details, see the GitHub Security Advisory GHSA-wrh9-cjv3-2hpw and the v6.19.1 Release Notes.

Workarounds

  • Avoid using the replacements option and the where option in the same Sequelize query
  • Use parameterized queries with bind parameters instead of replacements where possible
  • Implement strict input validation to reject SQL metacharacters before they reach Sequelize
  • Consider using stored procedures or prepared statements for sensitive database operations
bash
# Upgrade Sequelize to patched version
npm update sequelize@6.19.1

# Or install specific patched version
npm install sequelize@6.19.1

# Verify installed version
npm list sequelize

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

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechSequelizejs

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability3.98%

  • 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 Issue Discussion

  • GitHub Release v6.19.1
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory GHSA-wrh9-cjv3-2hpw
  • Related CVEs
  • CVE-2023-22578: Sequelize SQL Injection Vulnerability

  • CVE-2023-22580: Sequelize Information Disclosure Flaw
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