Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessConnect to exposed PgBouncer (AV:N)
-
DeliverySend StartupMessage with malicious search_path
-
Exploitauth_query resolves attacker-controlled objects
-
ExecutionExecute arbitrary SQL as auth user
-
ImpactRead/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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – 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)
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
Affected Packages
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
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
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.
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
4DescriptionNVD
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
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.
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
PgBouncer before 1.5.5 allows remote attackers to cause a denial of service (NULL pointer dereference and crash) by send
Stack-based buffer overflow in PgBouncer before 1.25.2 lets a malicious or impersonated PostgreSQL backend corrupt the p
A flaw was found in c-ares library, where a missing input validation check of host names returned by DNS (Domain Name Se
Authentication bypass in PgBouncer 1.17.0 through 1.26.0 allows an authenticated attacker who knows a valid password for
PgBouncer 1.6.x before 1.6.1, when configured with auth_user, allows remote attackers to gain login access as auth_user
Password can be used past expiry in PgBouncer due to auth_query not taking into account Postgres its VALID UNTIL value,
When PgBouncer is configured to use "cert" authentication, a man-in-the-middle attacker can inject arbitrary SQL queries
Unauthenticated remote attackers can render PgBouncer 1.20.0 through 1.26.0 unresponsive by sending a single crafted Sta
A crafted oversized input to the PgBouncer connection pooler (versions through 1.25.2) triggers an integer overflow in p
Unauthenticated remote attackers can crash PgBouncer through 1.25.2 by sending a malformed SCRAM client-final-message th
Remote denial-of-service in PgBouncer versions before 1.25.2 allows unauthenticated attackers to crash the connection po
Denial of service in PgBouncer before 1.25.2 lets a malicious or malfunctioning PostgreSQL backend crash the connection
Same weakness CWE-426 – Untrusted Search Path
View allSame technique Information Disclosure
View allVendor StatusVendor
Ubuntu
Priority: Medium| 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
| 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 | - |
EUVD-2025-201089
NVD
CVE.org
EPSS
GitHub PoC
Exploit-DB