Skip to content
Fencer Vulns
high 8.1

CVE-2021-3935 json

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

published 2021-11-22 4 y ago modified 2026-09-08 2 mo ago also BIT-pgbouncer-2021-3935 , EUVD-2021-27149

cvss
8.1
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
1.1%
EPSS 1.1% chance of exploitation in 30 days, percentile 66%
public exploits
0
none known

Summary

When PgBouncer is configured to use "cert" authentication, a man-in-the-middle attacker can inject arbitrary SQL queries when a connection is first established, despite the use of TLS certificate verification and encryption. This flaw affects PgBouncer versions prior to 1.16.1.

Patch / fix

  • bitnami pgbouncer 1.16.1
  • pgbouncer pgbouncer 1.16.1
  • pgbouncer Debian 14, Debian 13, Debian 12 1.16.1-1

debian advisories DEBIAN-CVE-2021-3935

  • pgbouncer Alpine 3.24, Alpine 3.23, Alpine 3.22 +4 more 1.16.1-r0

alpine advisories ALPINE-CVE-2021-3935

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • pgbouncer Arch Linux 1.16.1-1

arch linux advisories AVG-2578

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-3935 updated cvss 8.1

pgbouncer: server processes unencrypted bytes from man-in-the-middle

  • Red Hat All currently supported Red Hat products
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

1.12% chance of exploitation in the next 30 days, higher than 66% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
NVD 3.1 8.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 5.1 AV:N/AC:H/Au:N/C:P/I:P/A:P
OSV 3.1 8.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
bitnami pgbouncer
<1.16.1
1.16.1

Affected products

  • n/a pgbouncer

Classification

Weakness
  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command
  • CWE-295 Improper Certificate Validation

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.