# CVE-2026-107350: PgBouncer authentication bypass in SCRAM

Source: https://junglewise.ai/threats/cve-2026-107350-improper-authentication-in-pgbouncer-1-17-0-through-1-26-0  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-14. Updated: 2026-10-16  
License: CC BY 4.0 with a link back

CVE-2026-107350 · Severity: high · CVSS 8.8 · Published 2026-10-14

PgBouncer is a connection pooler that sits between applications and PostgreSQL databases, managing connections and authentication. Versions 1.17.0 through 1.26.0 contain an authentication bypass that allows an attacker who knows any user's password to impersonate any other SCRAM-authenticated user, including administrators and database superusers. This could lead to unauthorized database access, data theft, or malicious modifications by an attacker with a single valid password.

Technologies: [PgBouncer](https://junglewise.ai/threats/technologies/pgbouncer-pgbouncer). Vendors: [PgBouncer](https://junglewise.ai/threats/vendors/pgbouncer).

## Quick answers

**Is CVE-2026-107350 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-107350 being exploited in the wild.

**How severe is CVE-2026-107350?** High severity, with a CVSS score of 8.8, published 14 October 2026.

**Which products and versions are affected?** PgBouncer 1.17.0 through 1.26.0.

**Is there a fix for CVE-2026-107350?** Yes: fixed in PgBouncer 1.26.1. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-107350 attacked?** It is attacked over the network, in a hosted service.

**Am I affected by CVE-2026-107350?** Check whether you run PgBouncer at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in PgBouncer 1.26.1

## Technical details

The vulnerability exists in PgBouncer's SCRAM authentication handler, which incorrectly accepts a second StartupMessage during SCRAM authentication when connecting to a non-existent database. An attacker can send an initial authentication message for a known user, then send a second StartupMessage to switch the target user before the SCRAM exchange completes; the SCRAM verification is still performed against the first user's keys, allowing authentication as a different user. This requires both the original and target users to authenticate via SCRAM.

## Affected products

- PgBouncer PgBouncer 1.17.0 through 1.26.0

## Timeline

- 2026-10-14: disclosed

## References

- [https://www.pgbouncer.org/changelog.html](https://www.pgbouncer.org/changelog.html)

## Related threats

- [PgBouncer infinite loop denial of service in startup message parsing](https://junglewise.ai/threats/cve-2026-107349-an-infinite-loop-in-pgbouncer-1-20-0-through-1-26-0-allows-an)
- [PgBouncer uncontrolled CPU consumption in SCRAM authentication](https://junglewise.ai/threats/cve-2026-6669-missing-upper-bound-on-the-key-derivation-iteration-count-accepted)
- [PgBouncer integer overflow in packet buffer growth](https://junglewise.ai/threats/cve-2026-6668-integer-overflow-in-the-packet-buffer-growth-logic-in-pgbouncer)
- [Untrusted search path in auth_query connection handler in PgBouncer before 1.25.1 allows an unauthenticated attacker…](https://junglewise.ai/threats/cve-2025-12819-untrusted-search-path-in-auth-query-connection-handler-in)
