CVE-2021-3935
n/a pgbouncer: Improper Neutralization of Special Elements used in an SQL Command
Check your servers for CVE-2021-3935
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-3935 affects pgbouncer, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
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.
Exploitation
EPSS 1.12%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 66.9% of all scored CVEs. Scores of 1 Dec 2026.
Weakness
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
|
pgbouncer
n/a
|
affected PgBouncer 1.16.1
|
Is my server affected?
Find the installed version of pgbouncer and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i pgbouncer
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2021-3935 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2021-3935RHEL, Rocky, Alma, Fedora
rpm -q pgbouncer
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2021-3935Alpine
apk list --installed | grep -i pgbouncerWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2021-3935
trivy image --scanners vuln IMAGE | grep CVE-2021-3935
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- FEDORA-2021-761cda0b77 lists.fedoraproject.org · vendor advisory
Other references
- https://bugzilla.redhat.com/show_bug.cgi?id=2021251 bugzilla.redhat.com
- http://www.pgbouncer.org/changelog.html#pgbouncer-116x pgbouncer.org
- [debian-lts-announce] 20220214 [SECURITY] [DLA 2922-1] pgbouncer security update lists.debian.org · mailing list
- https://lists.debian.org/debian-lts-announce/2025/05/msg00032.html lists.debian.org
Source: the record CVE-2021-3935 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse