CVE-2026-6665 PgBouncer buffer overflow in SCRAM
A malicious backend can trigger a stack overflow in PgBouncer's SCRAM implementation, potentially leading to code execution or denial of service.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-6665?
CVE-2026-6665 is a high-severity memory corruption vulnerability in PgBouncer, published on 9 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
The SCRAM code in PgBouncer before 1.25.2 did not check the return value of strlcat() correctly when building the contents of the SCRAM client-final-message. A malicious backend that sends a SCRAM server-final-message with a long nonce can trigger a stack overflow.
Weakness: CWE-121
Which versions are affected by CVE-2026-6665?
1 open source package ship an affected version, including pgbouncer. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
pgbouncer Bitnami | All versions | 1.25.2 |
Products include Pgbouncer Pgbouncer.
How do I fix CVE-2026-6665?
Upgrade pgbouncer to 1.25.2 or later.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2026-6665 being exploited?
There is no known exploitation of CVE-2026-6665 in the wild and no public exploit code.
Other vulnerabilities in PgBouncer
Sources
Also known as AZL-86237, BIT-pgbouncer-2026-6665, CLEANSTART-2026-GK06303, DEBIAN-CVE-2026-6665, GHSA-mhmx-mjv6-w337, MINI-gmgh-r96c-fx35 and 1 more.