Skip to main content

PgBouncer EUVDEUVD-2025-201089

| CVE-2025-12819 HIGH
Untrusted Search Path (CWE-426)
2025-12-03 f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
8.1
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Connect to exposed PgBouncer (AV:N)
  2. Delivery
    Send StartupMessage with malicious search_path
  3. Exploit
    auth_query resolves attacker-controlled objects
  4. Execution
    Execute arbitrary SQL as auth user
  5. Impact
    Read/alter database or disrupt service

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V13 - Configuration Search path verification
Exploitation Conditions

Exploitation requires PgBouncer to be configured with the auth_query feature, which runs a query against the backend database to look up user credentials during authentication; the untrusted search_path supplied in the client's StartupMessage is propagated into that auth_query connection, enabling object-resolution hijacking and arbitrary SQL execution. The principal limiting factor is this non-default dependency: deployments that do not use auth_query (e.g. those relying on a static userlist / auth_file) are not exposed. No prior authentication is required (PR:N) and no user interaction is needed, but the high attack complexity (AC:H) reflects the configuration prerequisite and the need to craft objects that the manipulated search_path will resolve. Affects all PgBouncer versions before 1.25.1.

Impact

This is a genuine high-priority vulnerability where the signals are largely consistent. The CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:N/C:H/I:H/A:H, base 8.1) describes a network-reachable, unauthenticated (PR:N) flaw with full confidentiality, integrity, and availability impact, tempered only by high attack complexity (AC:H) - which here reflects the dependency on PgBouncer being configured with the auth_query feature rather than any intrinsic exploit difficulty. The patch is confirmed available (PgBouncer 1.25.1; Debian DLA-4422-1), and distributions (Ubuntu medium priority across 8 releases, Debian 6 releases) have tracked and shipped fixes, confirming the affected-version data. Counterbalancing this, the EPSS score is low (0.16%, 37th percentile), there is NO CISA KEV listing, and no public exploit code was identified in the provided data - so there is no evidence of active or imminent widespread exploitation at time of analysis. The practical read: real priority for any environment running PgBouncer with auth_query enabled (SQL execution in the privileged auth connection context is severe), but the low EPSS and absence of KEV/POC suggest it is not yet being mass-exploited. The AC:H and the auth_query configuration prerequisite meaningfully narrow the exposed population below the raw 8.1 score.

Exploit ScenarioDerived

An attacker connects to a PgBouncer instance configured with auth_query and sends a PostgreSQL StartupMessage containing a crafted search_path parameter. Because PgBouncer passes this untrusted search_path into the backend connection used to run auth_query during authentication, the attacker can cause attacker-controlled schema objects (e.g. functions) to be resolved and executed, running arbitrary SQL in the context of the privileged auth_query user before authentication completes. No public exploit code was identified at time of analysis.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Oct 18, 2026

Arbitrary SQL execution during authentication affects PgBouncer before 1.25.1 when the non-default auth_query feature is enabled, because a client-supplied search_path in the StartupMessage is propagated into the backend auth_query connection. Remote unauthenticated attackers who can reach the pooler can hijack object resolution and run SQL with the auth_query database role's privileges; deployments using a static auth_file/userlist are not exposed. No public exploit code was identified at time of analysis and EPSS is low at 0.16%, but a vendor patch exists in PgBouncer 1.25.1.

Earlier versions of this analysis (1)
v1 Mar 15, 2026 - 16:14 CVSS 7.5

RemediationAI

Upgrade to PgBouncer 1.25.1 or later, which is the vendor-released patch for this issue, and review the changelog at https://www.pgbouncer.org/changelog.html#pgbouncer-125x. Debian LTS users should apply advisory DLA-4422-1, and Ubuntu users should install the updated package for their tracked release. If immediate upgrade is not possible, disable auth_query and switch to a static auth_file/userlist; this removes the vulnerable backend credential lookup path but changes user management to require local file maintenance. As a compensating control, restrict network access to PgBouncer so only trusted clients can connect; this reduces exposure but does not fix the underlying search_path flaw. After patching, confirm that client-supplied StartupMessage parameters cannot influence the auth_query search_path and use explicit schema-qualified objects in auth_query as defense in depth.

Affected VersionsENISA

PgBouncer 0 <1.25.1

Affected Packages

euvd pgbouncer fix: 1.25.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

PgBouncer is a connection pooler for PostgreSQL. Its auth_query feature, which is not enabled by default, performs a backend database query to retrieve credentials during client authentication; that query commonly relies on object names whose resolution is influenced by search_path. CVE-2025-12819 is rooted in CWE-426, untrusted search path: PgBouncer before 1.25.1 fails to prevent a search_path value supplied in the client StartupMessage from affecting the auth_query connection, allowing an attacker to redirect unqualified object resolution to attacker-influenced or malicious objects and thereby execute arbitrary SQL in the auth_query session. The CPE cpe:2.3:a:pgbouncer:pgbouncer:*:*:*:*:*:*:*:* and EUVD range 0 <1.25.1 indicate all prior versions are in scope, but the practical prerequisite is that the deployment uses auth_query rather than a static authentication file.

Know when Pgbouncer gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 8.1 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 8.1 HIGH

Pre-auth network vector (PR:N/AV:N); AC:H because the auth_query feature must be configured and attacker-controlled objects crafted; arbitrary SQL execution yields full C/I/A impact.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Ubuntu MEDIUM

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

4
CVSS changed
Oct 18, 2026 - 18:22 NVD
7.5 (HIGH) 8.1 (HIGH)
Patch released
Mar 31, 2026 - 21:13 nvd
Patch available
CVE Published
Dec 03, 2025 - 19:15 nvd
HIGH 8.1
CVE Published
Dec 03, 2025 - 19:15 nvd
HIGH 7.5

DescriptionNVD

Untrusted search path in auth_query connection handler in PgBouncer before 1.25.1 allows an unauthenticated attacker to execute arbitrary SQL during authentication via a malicious search_path parameter in the StartupMessage.

Executive ViewAI

Why It Matters

CVE-2025-12819 affects PgBouncer, a critical database connection pooling service, allowing unauthenticated attackers to execute arbitrary SQL commands during the authentication phase. Organizations running affected versions face potential unauthorized database access, data exfiltration, and system compromise without requiring valid credentials.

Business Impact: High
Compensating Controls

Implement network-level access controls to restrict connectivity to PgBouncer to known, trusted application servers only. Deploy WAF or database firewall rules to block suspicious StartupMessage packets with malformed search_path parameters. Monitor authentication logs for failed login attempts and SQL execution anomalies. Disable search_path parameter functionality in PgBouncer configuration if application logic permits. Implement database-level authentication and authorization hardening to limit damage from compromised connections.

Threat Intelligence Overview

EPSS Score
0.2%
Top 63% exploitable
Prevalence
Medium
common PostgreSQL connection pooler, but auth_query mode not universally deployed
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

40
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +40
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2015-4054 HIGH POC
7.5 May 23

PgBouncer before 1.5.5 allows remote attackers to cause a denial of service (NULL pointer dereference and crash) by send

CVE-2026-6665 CRITICAL
9.8 May 09

Stack-based buffer overflow in PgBouncer before 1.25.2 lets a malicious or impersonated PostgreSQL backend corrupt the p

CVE-2021-3672 MEDIUM POC
5.6 Nov 23

A flaw was found in c-ares library, where a missing input validation check of host names returned by DNS (Domain Name Se

CVE-2026-107350 HIGH
8.8 Oct 14

Authentication bypass in PgBouncer 1.17.0 through 1.26.0 allows an authenticated attacker who knows a valid password for

CVE-2015-6817 HIGH
8.1 May 23

PgBouncer 1.6.x before 1.6.1, when configured with auth_user, allows remote attackers to gain login access as auth_user

CVE-2025-2291 HIGH
8.1 Apr 16

Password can be used past expiry in PgBouncer due to auth_query not taking into account Postgres its VALID UNTIL value,

CVE-2021-3935 HIGH
8.1 Nov 22

When PgBouncer is configured to use "cert" authentication, a man-in-the-middle attacker can inject arbitrary SQL queries

CVE-2026-107349 HIGH
7.5 Oct 14

Unauthenticated remote attackers can render PgBouncer 1.20.0 through 1.26.0 unresponsive by sending a single crafted Sta

CVE-2026-6668 HIGH
7.5 Sep 23

A crafted oversized input to the PgBouncer connection pooler (versions through 1.25.2) triggers an integer overflow in p

CVE-2026-19888 HIGH
7.5 Sep 23

Unauthenticated remote attackers can crash PgBouncer through 1.25.2 by sending a malformed SCRAM client-final-message th

CVE-2026-6664 HIGH
7.5 May 09

Remote denial-of-service in PgBouncer versions before 1.25.2 allows unauthenticated attackers to crash the connection po

CVE-2026-6666 HIGH
7.5 May 09

Denial of service in PgBouncer before 1.25.2 lets a malicious or malfunctioning PostgreSQL backend crash the connection

Vendor StatusVendor

Ubuntu

Priority: Medium
pgbouncer
Release Status Version
xenial needs-triage -
bionic needs-triage -
focal needs-triage -
jammy needs-triage -
noble needs-triage -
questing needs-triage -
upstream released 1.25.1-1
plucky ignored end of life, was needs-triage

Debian

pgbouncer
Release Status Fixed Version Urgency
bullseye fixed 1.15.0-1+deb11u2 -
bullseye (security) fixed 1.15.0-1+deb11u2 -
bookworm fixed 1.18.0-1+deb12u1 -
trixie fixed 1.24.1-1+deb13u1 -
forky, sid fixed 1.25.1-1 -
(unstable) fixed 1.25.1-1 -

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy