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
    • AI 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-2024-32655

CVE-2024-32655: Npgsql .NET Provider SQLi Vulnerability

CVE-2024-32655 is a SQL injection flaw in Npgsql, the .NET data provider for PostgreSQL, caused by integer overflow that enables arbitrary SQL execution. This article covers technical details, affected versions, and patches.

Published: January 28, 2026

CVE-2024-32655 Overview

CVE-2024-32655 is a critical integer overflow vulnerability in Npgsql, the .NET data provider for PostgreSQL. The vulnerability exists in the WriteBind() method within src/Npgsql/Internal/NpgsqlConnector.FrontendMessages.cs, where int variables are used to store message length and parameter length sums. When parameter lengths become sufficiently large, these integer variables overflow, causing Npgsql to write an incorrectly small message size when constructing PostgreSQL protocol messages. This protocol desynchronization allows attackers to inject arbitrary Postgres protocol messages into the database connection, ultimately enabling execution of arbitrary SQL statements.

Critical Impact

This vulnerability enables attackers to inject arbitrary SQL statements through integer overflow in protocol message handling, potentially leading to complete database compromise, data exfiltration, and unauthorized data manipulation.

Affected Products

  • Npgsql versions prior to 4.0.14
  • Npgsql versions 4.1.x prior to 4.1.13
  • Npgsql versions 5.0.x prior to 5.0.18
  • Npgsql versions 6.0.x prior to 6.0.11
  • Npgsql versions 7.0.x prior to 7.0.7
  • Npgsql versions 8.0.x prior to 8.0.3

Discovery Timeline

  • May 14, 2024 - CVE-2024-32655 published to NVD
  • December 12, 2024 - Last updated in NVD database

Technical Details for CVE-2024-32655

Vulnerability Analysis

This vulnerability represents a classic integer overflow condition that leads to protocol message injection. The WriteBind() method in Npgsql calculates the total message length by summing individual parameter lengths using signed 32-bit integers (int). When an application passes parameters with a combined size exceeding the maximum value of a signed 32-bit integer (2,147,483,647 bytes), the sum overflows and wraps to a negative or small positive value.

The PostgreSQL wire protocol relies on accurate message length headers to delimit messages. When the overflow causes Npgsql to write an incorrectly small message size, the PostgreSQL server reads only that small number of bytes as the intended message. The remaining bytes—still part of the original oversized message—are then interpreted by PostgreSQL as new, separate protocol messages. This creates a protocol desynchronization condition that attackers can exploit to inject crafted SQL statements that execute with the application's database privileges.

Root Cause

The root cause is the use of signed 32-bit integer (int) variables to calculate and store message lengths in the PostgreSQL protocol message construction code. The WriteBind() method accumulates parameter sizes without bounds checking, allowing integer overflow when the sum of all parameter lengths exceeds Int32.MaxValue. The fix involves using larger data types and implementing proper overflow detection to prevent the message length from being incorrectly calculated.

Attack Vector

An attacker can exploit this vulnerability by providing application inputs that result in large parameter values being passed to PostgreSQL through Npgsql. When the combined parameter data causes the integer overflow, the attacker can craft the overflow bytes to form valid PostgreSQL protocol messages containing malicious SQL statements.

The attack requires:

  1. Network access to interact with the application
  2. The ability to influence parameter data sent through Npgsql to PostgreSQL
  3. Careful calculation of payload sizes to trigger the integer overflow at a precise point

The vulnerability manifests in the PostgreSQL protocol message construction within the WriteBind() method. When the sum of parameter lengths overflows the int variable, the message length written to the protocol header becomes incorrect, causing PostgreSQL to misparse subsequent bytes as new protocol messages. For detailed technical analysis, see the GitHub Security Advisory GHSA-x9vc-6hfv-hg8c and the associated security video demonstration.

Detection Methods for CVE-2024-32655

Indicators of Compromise

  • Unusually large data transfers to PostgreSQL databases that approach or exceed 2GB per transaction
  • Database logs showing unexpected or malformed SQL statements appearing to originate from legitimate application connections
  • Protocol errors in PostgreSQL logs indicating message parsing failures or unexpected message types
  • Evidence of data exfiltration or unauthorized database modifications without corresponding application-level audit trails

Detection Strategies

  • Monitor application logs for unusually large parameter values being passed to database queries
  • Implement database activity monitoring (DAM) to detect SQL statements that don't match expected application patterns
  • Deploy network intrusion detection systems (NIDS) with rules to identify anomalous PostgreSQL protocol traffic, particularly messages with inconsistent length headers
  • Use SentinelOne Singularity to detect suspicious process behavior indicative of exploitation attempts

Monitoring Recommendations

  • Enable detailed PostgreSQL logging including log_statement = 'all' and log_min_error_statement = 'error' to capture potential exploitation attempts
  • Implement application-level logging of parameter sizes before database operations to identify overflow attempts
  • Configure alerts for database connections exhibiting protocol-level anomalies or unexpected SQL execution patterns

How to Mitigate CVE-2024-32655

Immediate Actions Required

  • Upgrade Npgsql to a patched version immediately: 4.0.14, 4.1.13, 5.0.18, 6.0.11, 7.0.7, or 8.0.3 depending on your current major version
  • Audit applications using Npgsql to identify any that accept large user-controlled inputs that could be passed as database parameters
  • Implement input validation at the application layer to reject abnormally large parameter values before they reach Npgsql
  • Review database access logs for signs of exploitation or suspicious SQL execution patterns

Patch Information

Npgsql has released patched versions across all supported release branches. The fixes address the integer overflow by implementing proper bounds checking and using appropriate data types for length calculations. Organizations should upgrade to the following versions:

Current VersionUpgrade To
4.0.xv4.0.14
4.1.xv4.1.13
5.0.xv5.0.18
6.0.xv6.0.11
7.0.xv7.0.7
8.0.xv8.0.3

Multiple commits address this vulnerability across different branches. Review the GitHub Security Advisory for complete details.

Workarounds

  • Implement application-level size limits on any user-controlled data that may be passed as database parameters
  • Deploy a Web Application Firewall (WAF) configured to block requests containing excessively large payloads
  • Use network segmentation to limit database access to only authorized application servers
  • Consider implementing prepared statement parameter size validation at the application tier as a defense-in-depth measure
bash
# Check your current Npgsql version in .NET projects
dotnet list package | grep -i npgsql

# Update Npgsql to the latest patched version
dotnet add package Npgsql --version 8.0.3

# For older framework versions, update to the appropriate patched version
# Example for projects on 6.0.x branch:
dotnet add package Npgsql --version 6.0.11

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

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechNpgsql

  • SeverityHIGH

  • CVSS Score8.1

  • EPSS Probability2.07%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-89
  • Technical References
  • GitHub Commit 091655ee

  • GitHub Commit 3183efb2

  • GitHub Commit 67acbe02

  • GitHub Commit 703d9af8

  • GitHub Commit a22a42d8

  • GitHub Commit e34e2ba8

  • GitHub Commit f7e7ead0

  • GitHub Release v4.0.14

  • GitHub Release v4.1.13

  • GitHub Release v5.0.18

  • GitHub Release v6.0.11

  • GitHub Release v7.0.7

  • GitHub Release v8.0.3

  • GitHub Security Advisory GHSA-x9vc-6hfv-hg8c

  • YouTube Security Video
  • 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