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-2023-32305

CVE-2023-32305: Aiven PostgreSQL Privilege Escalation

CVE-2023-32305 is a privilege escalation vulnerability in Aiven-extras PostgreSQL extension that allows low-privileged users to gain superuser access. This article covers the technical details, affected versions, and mitigation.

Published: February 4, 2026

CVE-2023-32305 Overview

CVE-2023-32305 is a privilege escalation vulnerability affecting the aiven-extras PostgreSQL extension. Versions prior to 1.1.9 contain a critical flaw that allows low-privileged users to escalate their privileges to superuser within PostgreSQL databases utilizing the aiven-extras package. The vulnerability exploits missing schema qualifiers on privileged functions called by the extension, enabling attackers to create malicious objects that collide with existing function names and execute arbitrary code with elevated privileges.

Critical Impact

Successful exploitation allows a low-privileged database user to acquire superuser privileges, granting full unrestricted access to all data and database functions. This could lead to arbitrary code execution or data access on the underlying host as the postgres user.

Affected Products

  • aiven-extras PostgreSQL extension versions prior to 1.1.9
  • PostgreSQL databases utilizing the vulnerable aiven-extras package
  • Aiven managed database services using affected extension versions

Discovery Timeline

  • May 12, 2023 - CVE-2023-32305 published to NVD
  • November 21, 2024 - Last updated in NVD database

Technical Details for CVE-2023-32305

Vulnerability Analysis

This privilege escalation vulnerability stems from improper input validation (CWE-20) in how the aiven-extras extension handles function calls. The extension fails to use fully qualified schema names when invoking built-in PostgreSQL functions, creating a search path hijacking opportunity.

When the extension executes functions like array_length() without the pg_catalog. schema prefix, PostgreSQL's function resolution mechanism searches through the schema search path in order. An attacker with the ability to create objects in a schema that appears earlier in the search path than pg_catalog can create a malicious function with the same name. When the extension subsequently calls the unqualified function, the attacker's malicious implementation executes instead, running with the extension's elevated privileges.

The attack is network-accessible and requires only low-level database privileges, with no user interaction needed. Successful exploitation grants the attacker superuser access, compromising all aspects of database confidentiality, integrity, and availability.

Root Cause

The root cause is missing schema qualifiers on privileged function calls within the aiven-extras extension. PostgreSQL functions should be called with explicit schema prefixes (e.g., pg_catalog.array_length()) to prevent search path manipulation attacks. Without these qualifiers, the database engine follows the configured search_path to resolve function names, which can be exploited by creating shadow functions in schemas the attacker controls.

Attack Vector

The attack vector involves a low-privileged database user creating malicious functions that shadow legitimate PostgreSQL catalog functions. The attacker:

  1. Creates a schema or uses an existing schema that appears before pg_catalog in the search path
  2. Creates a function with the same name and signature as a function called by aiven-extras (e.g., array_length)
  3. The malicious function contains code to escalate privileges or execute arbitrary commands
  4. When aiven-extras executes the unqualified function call, the attacker's version runs with elevated privileges

The following patch demonstrates the fix applied in version 1.1.9, which adds explicit pg_catalog. schema qualifiers to function calls:

text
   l_parsed_ident TEXT[];
   l_parsed_arg_tables TEXT[];
 BEGIN
-    l_table_count = array_length(arg_tables, 1);
+    l_table_count = pg_catalog.array_length(arg_tables, 1);
     IF l_table_count >= 1
     THEN
         l_parsed_arg_tables = ARRAY[]::TEXT[];
         l_tables_command = 'CREATE PUBLICATION %I FOR TABLE ';
         FOREACH l_ident IN ARRAY arg_tables LOOP
             l_parsed_ident = parse_ident(l_ident);
-            ASSERT array_length(l_parsed_ident, 1) <= 2, 'Only simple table names or tables qualified with schema names allowed';
+            ASSERT pg_catalog.array_length(l_parsed_ident, 1) <= 2, 'Only simple table names or tables qualified with schema names allowed';
             -- Make sure we pass in a simple list of identifiers, so separate the tables from parent schemas
-            IF array_length(l_parsed_ident, 1) = 2
+            IF pg_catalog.array_length(l_parsed_ident, 1) = 2
             THEN
                 l_tables_command = l_tables_command || '%I.%I, ';
             ELSE

Source: GitHub Commit 8682ae01bec0791708bf25791786d776e2fb0250

Detection Methods for CVE-2023-32305

Indicators of Compromise

  • Unexpected functions created in user-accessible schemas with names matching PostgreSQL catalog functions (e.g., array_length, parse_ident)
  • Unusual privilege grants or new superuser accounts in the database
  • Database audit logs showing function creation followed by privilege escalation activities
  • Changes to search_path settings for database users or roles

Detection Strategies

  • Query pg_proc and pg_namespace to identify user-defined functions that shadow pg_catalog functions
  • Monitor PostgreSQL logs for CREATE FUNCTION statements that match known catalog function names
  • Implement database activity monitoring to detect unauthorized privilege escalation
  • Use security scanning tools to identify installed aiven-extras versions below 1.1.9

Monitoring Recommendations

  • Enable detailed PostgreSQL logging including log_statement = 'ddl' to capture function creation events
  • Configure alerts for new superuser role grants or unexpected privilege changes
  • Regularly audit database schemas for suspicious function definitions
  • Implement real-time monitoring of security-sensitive database operations

How to Mitigate CVE-2023-32305

Immediate Actions Required

  • Upgrade aiven-extras to version 1.1.9 or later immediately
  • Audit existing databases for any suspicious user-created functions that shadow catalog functions
  • Review and restrict database user privileges to the minimum required
  • Check for any unauthorized superuser accounts that may have been created through exploitation

Patch Information

The vulnerability has been patched in aiven-extras version 1.1.9. The fix adds explicit pg_catalog. schema qualifiers to all privileged function calls within the extension, preventing search path hijacking attacks. Organizations should update to the patched version as soon as possible.

For detailed patch information, refer to the GitHub Commit and the GitHub Security Advisory GHSA-7r4w-fw4h-67gp.

Workarounds

  • Restrict user permissions to prevent creation of functions in schemas that could shadow pg_catalog
  • Configure search_path to always prioritize pg_catalog first for all database users
  • Revoke CREATE privileges on public and user-accessible schemas from untrusted users
  • Consider temporarily disabling the aiven-extras extension until patching is complete
bash
# Verify aiven-extras version
psql -c "SELECT * FROM pg_available_extensions WHERE name = 'aiven_extras';"

# Audit for suspicious functions shadowing pg_catalog
psql -c "SELECT n.nspname, p.proname FROM pg_proc p JOIN pg_namespace n ON p.pronamespace = n.oid WHERE n.nspname NOT IN ('pg_catalog', 'information_schema') AND p.proname IN (SELECT proname FROM pg_proc WHERE pronamespace = 'pg_catalog'::regnamespace);"

# Restrict search_path for users
ALTER ROLE suspicious_user SET search_path = pg_catalog, public;

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

  • Vulnerability Details
  • TypePrivilege Escalation

  • Vendor/TechAiven

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability0.85%

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

  • NVD-CWE-noinfo
  • Technical References
  • NetApp Security Advisory ntap-20230616-0006
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory GHSA-7r4w-fw4h-67gp
  • Related CVEs
  • CVE-2026-39961: Aiven Operator Information Disclosure Flaw
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