IT SBIT Services
Schneeberger
DEEN
CVE tracker

PgBouncer: Authentication bypass via second StartupMessage in SCRAM authentication

CVE-2026-107350High 8.8

← All vulnerabilities

Summary

PgBouncer versions 1.17.0 through 1.26.0 accept a second StartupMessage during SCRAM authentication when the client targets a non-existent database. The login then switches to another user while the SCRAM exchange is still verified against the first user's keys. An attacker who knows the password of a user listed in auth_file can log in as any other SCRAM user, including PgBouncer admin users and backend superusers, which can lead to full compromise of the PostgreSQL database. The attack requires SCRAM authentication for both users; the default configuration is not affected.

Affected

  • PgBouncer 1.17.0 through 1.26.0
  • Conditions: SCRAM authentication is used for both the attacker's user and the impersonated user; the impersonated user can come from auth_file or auth_query

Fixed in

  • PgBouncer 1.26.1 (released 2026-10-14)

Workaround

  • No vendor-documented workaround found.
  • Vendor note: the issue requires SCRAM for both users; hardening measures are the operator's own suggestions, not vendor guidance.

Exploitation

  • Exploited in the wild: none known.
  • Not listed in CISA KEV.
  • Public proof of concept: none found in our research (this does not prove that none exists).
  • CISA SSVC: exploitation none, not automatable, total technical impact.
  • EPSS was about 0.0037 when captured.

Our recommendation

  • Upgrade PgBouncer to version 1.26.1 or later as soon as possible. Check your distribution's security tracker for the exact package version.
  • Until the upgrade, restrict network access to the PgBouncer port to the application hosts that need it.
  • Review and limit the accounts listed in auth_file.
  • Restrict access to the admin console.
  • Monitor logins and check for unexpected user switches in logs.
  • Priority: high if PgBouncer fronts production PostgreSQL with SCRAM users; medium if it runs on a tightly segmented internal network.

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 31 Oct 2026, 16:43.

Original description (NVD)

Improper authentication in PgBouncer 1.17.0 through 1.26.0 allows a remote attacker who knows the password of a user listed in auth_file to log in as any other user that authenticates using SCRAM, including PgBouncer admin users and backend superusers. A second StartupMessage sent during SCRAM authentication against a non-existent database is not rejected and switches the user being logged in as, while the SCRAM exchange is still verified against the keys of the first user.

NVD references (1)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.