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-2025-2291

CVE-2025-2291: PgBouncer Auth Bypass Vulnerability

CVE-2025-2291 is an authentication bypass flaw in PgBouncer that allows expired passwords to remain valid. Attackers can exploit this to gain unauthorized access. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: March 11, 2026

CVE-2025-2291 Overview

A critical authentication bypass vulnerability exists in PgBouncer, a lightweight connection pooler for PostgreSQL. The vulnerability stems from the auth_query mechanism failing to account for PostgreSQL's VALID UNTIL password expiration value. This flaw allows an attacker to authenticate using credentials that have already expired according to PostgreSQL's password policy, effectively bypassing the intended password expiration security controls.

Critical Impact

Attackers can log in with expired passwords, completely bypassing password expiration policies and potentially gaining unauthorized access to protected PostgreSQL databases through PgBouncer connection pooling.

Affected Products

  • PgBouncer (all versions prior to the patch)
  • Debian Linux 11.0

Discovery Timeline

  • 2025-04-16 - CVE-2025-2291 published to NVD
  • 2025-12-08 - Last updated in NVD database

Technical Details for CVE-2025-2291

Vulnerability Analysis

This vulnerability is classified under CWE-324 (Use of a Key Past its Expiration Date). The core issue lies in how PgBouncer handles authentication when configured to use auth_query for credential validation. PostgreSQL provides a VALID UNTIL timestamp field for role passwords that defines when a password should expire and no longer be accepted for authentication. However, PgBouncer's auth_query implementation retrieves and validates the password hash without checking this expiration timestamp.

When PgBouncer performs authentication via auth_query, it queries the PostgreSQL pg_shadow or pg_authid catalog tables to retrieve the password hash for comparison. The vulnerability occurs because the query retrieves the password hash but ignores the valuntil (VALID UNTIL) column that contains the password expiration date. This allows connections to succeed with credentials that PostgreSQL itself would reject if the client connected directly to the database.

Root Cause

The root cause is an incomplete implementation of PostgreSQL's authentication semantics within PgBouncer's auth_query feature. When PgBouncer validates credentials, it performs a password hash comparison but fails to evaluate the temporal validity of the password. PostgreSQL's VALID UNTIL feature is designed as a security control to enforce password rotation policies and limit the exposure window of compromised credentials. By not respecting this field, PgBouncer creates an authentication bypass where expired credentials remain functional indefinitely when connecting through the connection pooler.

Attack Vector

The attack vector is network-based and requires no privileges or user interaction. An attacker who possesses valid but expired database credentials can successfully authenticate to PgBouncer and gain access to the backend PostgreSQL database. This is particularly concerning in scenarios where:

  1. Password rotation policies are enforced through VALID UNTIL dates
  2. Users or service accounts have had their passwords expired as part of credential revocation
  3. Credentials were leaked or compromised and subsequently expired as a mitigation measure

The attacker simply needs to attempt authentication through PgBouncer using the expired credentials. Since PgBouncer does not verify the expiration timestamp, the authentication succeeds even though the same credentials would be rejected by a direct PostgreSQL connection.

Detection Methods for CVE-2025-2291

Indicators of Compromise

  • Successful authentication events in PgBouncer logs from accounts that have expired VALID UNTIL timestamps in PostgreSQL
  • Discrepancy between PgBouncer connection logs and PostgreSQL authentication logs for the same credentials
  • Database connections originating from PgBouncer for users whose passwords should have expired
  • Unusual access patterns from accounts that were believed to be decommissioned

Detection Strategies

  • Compare PgBouncer authentication successes against PostgreSQL pg_authid table to identify connections using expired credentials
  • Implement custom logging to track authentication attempts and cross-reference with VALID UNTIL timestamps
  • Monitor for authentication from accounts with valuntil dates in the past
  • Set up alerts for any successful PgBouncer connections from accounts in a known-expired state

Monitoring Recommendations

  • Enable verbose logging in PgBouncer to capture all authentication events
  • Regularly audit PostgreSQL roles with VALID UNTIL settings against PgBouncer connection logs
  • Implement a scheduled job to identify and alert on expired credentials that have recent PgBouncer authentication activity
  • Consider logging directly to a SIEM for correlation of authentication events across PgBouncer and PostgreSQL

How to Mitigate CVE-2025-2291

Immediate Actions Required

  • Upgrade PgBouncer to version 1.24.x or later which addresses this vulnerability
  • Review all PostgreSQL roles with expired VALID UNTIL timestamps and reset their passwords
  • Audit recent PgBouncer authentication logs for any access using credentials that should have been expired
  • Consider temporarily switching from auth_query to auth_file or auth_hba_file authentication methods until patched

Patch Information

The vulnerability has been addressed in PgBouncer version 1.24.x. According to the PgBouncer Change Log, this release includes fixes for the authentication bypass vulnerability. Debian Linux 11 users should refer to the Debian LTS Announcement for distribution-specific patching information.

Workarounds

  • Implement application-level password expiration checks before connecting through PgBouncer
  • Use auth_file authentication mode and manually update the file when credentials expire
  • Deploy network segmentation to limit access to PgBouncer from untrusted sources
  • Immediately change passwords for any accounts that rely on VALID UNTIL for expiration rather than waiting for expiry
bash
# Query to identify PostgreSQL roles with expired passwords that may be affected
psql -c "SELECT rolname, rolvaliduntil FROM pg_roles WHERE rolvaliduntil IS NOT NULL AND rolvaliduntil < NOW();"

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

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechPgbouncer

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.30%

  • 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-324
  • Technical References
  • PgBouncer Change Log

  • Debian LTS Announcement
  • Related CVEs
  • CVE-2025-12819: PgBouncer 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