Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-2025-46337

CVE-2025-46337: ADOdb PHP Library SQLi Vulnerability

CVE-2025-46337 is a SQL injection vulnerability in ADOdb PHP database library affecting PostgreSQL connections. Attackers can execute arbitrary SQL via pg_insert_id(). This article covers technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2025-46337 Overview

CVE-2025-46337 is a SQL Injection vulnerability affecting ADOdb, a popular PHP database class library that provides abstractions for performing queries and managing databases. Prior to version 5.22.9, improper escaping of a query parameter in the pg_insert_id() function may allow an attacker to execute arbitrary SQL statements when the code using ADOdb connects to a PostgreSQL database and is called with user-supplied data.

Critical Impact

This vulnerability allows unauthenticated remote attackers to execute arbitrary SQL commands against PostgreSQL databases, potentially leading to complete database compromise including data theft, modification, or destruction.

Affected Products

  • ADOdb versions prior to 5.22.9
  • Applications using ADOdb with PostgreSQL database connections
  • Systems calling pg_insert_id() with user-controlled input

Discovery Timeline

  • 2025-05-01 - CVE-2025-46337 published to NVD
  • 2025-05-26 - Last updated in NVD database

Technical Details for CVE-2025-46337

Vulnerability Analysis

This SQL Injection vulnerability (CWE-89) exists in the PostgreSQL driver component of ADOdb, specifically within the pg_insert_id() function located in drivers/adodb-postgres64.inc.php. The vulnerability stems from the direct concatenation of user-supplied table and field names into a SQL query without proper sanitization or escaping.

When an application passes user-controlled data to pg_insert_id(), an attacker can craft malicious input that breaks out of the intended query structure and injects arbitrary SQL commands. This is particularly dangerous because the function constructs a sequence name by concatenating the $tablename and $fieldname parameters directly into the query string.

The vulnerability is remotely exploitable over the network without requiring authentication or user interaction. The scope extends beyond the vulnerable component, meaning a successful attack could affect resources beyond the ADOdb library itself, potentially impacting the entire database server and any applications relying on it.

Root Cause

The root cause is the absence of proper input validation and escaping when constructing the SQL query within pg_insert_id(). The vulnerable code directly concatenates the $tablename and $fieldname parameters into a SQL query string without using PostgreSQL's pg_escape_identifier() function to safely escape the identifier names. This allows specially crafted input containing SQL metacharacters to alter the intended query logic.

Attack Vector

The attack vector is network-based, targeting web applications or services that use ADOdb to connect to PostgreSQL databases. An attacker can exploit this vulnerability by:

  1. Identifying an application endpoint that calls pg_insert_id() with user-controllable parameters
  2. Crafting malicious input containing SQL injection payloads in the table name or field name parameters
  3. Submitting the payload through the application's interface
  4. Executing arbitrary SQL commands against the PostgreSQL database

The following code shows the security patch that addresses this vulnerability:

php
 	// get the last id - never tested
 	function pg_insert_id($tablename,$fieldname)
 	{
-		$result=pg_query($this->_connectionID, 'SELECT last_value FROM '. $tablename .'_'. $fieldname .'_seq');
+		$sequence = pg_escape_identifier($this->_connectionID, $tablename .'_'. $fieldname .'_seq');
+		$result = pg_query($this->_connectionID, 'SELECT last_value FROM '. $sequence);
 		if ($result) {
 			$arr = @pg_fetch_row($result,0);
 			pg_free_result($result);

Source: GitHub Commit Update

Detection Methods for CVE-2025-46337

Indicators of Compromise

  • Unusual or malformed SQL queries in PostgreSQL logs containing sequence name references with injection patterns
  • Application errors related to pg_insert_id() function calls with unexpected syntax
  • Database access logs showing queries with SQL metacharacters in table or field name positions
  • Evidence of data exfiltration or unauthorized database modifications

Detection Strategies

  • Review application code for calls to pg_insert_id() that accept user-supplied input for table or field names
  • Implement Web Application Firewall (WAF) rules to detect SQL injection patterns in request parameters
  • Enable PostgreSQL query logging and analyze for anomalous query structures targeting sequence tables
  • Conduct static application security testing (SAST) scans focusing on ADOdb library usage patterns

Monitoring Recommendations

  • Enable verbose PostgreSQL logging to capture all queries including those targeting sequence objects
  • Configure intrusion detection systems to alert on SQL injection attack signatures
  • Monitor application logs for exceptions or errors from the ADOdb PostgreSQL driver
  • Set up database activity monitoring to detect unauthorized data access or modification patterns

How to Mitigate CVE-2025-46337

Immediate Actions Required

  • Upgrade ADOdb to version 5.22.9 or later immediately
  • Audit all code paths that call pg_insert_id() to ensure user input is not passed directly to this function
  • Implement input validation to restrict table and field names to expected alphanumeric patterns
  • Review and test all applications using ADOdb with PostgreSQL connections for SQL injection vulnerabilities

Patch Information

The vulnerability has been patched in ADOdb version 5.22.9. The fix introduces proper escaping of the sequence name using PostgreSQL's pg_escape_identifier() function before incorporating it into the SQL query. Organizations should upgrade to this version or apply the patch from commit 11107d6d6e5160b62e05dff8a3a2678cf0e3a426.

For additional information, refer to the GitHub Security Advisory GHSA-8x27-jwjr-8545 and the Debian LTS Security Announcement.

Workarounds

  • Avoid passing user-controlled data to the pg_insert_id() function until the patch is applied
  • Implement strict allow-list validation for any table or field names that must be user-supplied
  • Use parameterized queries and prepared statements throughout the application as a defense-in-depth measure
  • Consider using database user accounts with minimal required privileges to limit potential damage from exploitation
bash
# Update ADOdb via Composer
composer require adodb/adodb-php:^5.22.9

# Verify installed version
composer show adodb/adodb-php | grep version

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

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechAdodb

  • SeverityCRITICAL

  • CVSS Score10.0

  • EPSS Probability0.08%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-89
  • Technical References
  • GitHub Commit Update

  • GitHub Issue Discussion

  • GitHub Security Advisory GHSA-8x27-jwjr-8545

  • Debian LTS Security Announcement

  • Xaliom Blog Post on CVE-2025-46337
  • Related CVEs
  • CVE-2025-54119: ADOdb PHP Library SQL Injection 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