Integer overflow causes an infinite loop in message buffer growth in PgBouncer

Summary

CVECVE-2026-107348
StatePUBLISHED
AssignerPostgreSQL
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-10-14 18:17:25 UTC
Updated2026-10-16 21:17:18 UTC
DescriptionInteger overflow in the message buffer growth logic (mbuf_make_room) in PgBouncer 1.21.0 through 1.26.0 allows a remote attacker to cause a denial of service when max_packet_size is configured above 2147483648. A packet header declaring a length above 2^31 makes the buffer size computation overflow, leaving the growth loop unable to terminate. Because PgBouncer serves all clients from a single process, this saturates a CPU core and stalls every pooled connection until the process is restarted. Since 1.23.0 the overflow is reachable before authentication with a five-byte packet header.

Risk And Classification

Primary CVSS: v3.1 5.9 MEDIUM from f86ef6dc-4d3a-42ad-8f28-e6d5547a5007

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Problem Types: CWE-190 | CWE-835 | CWE-190 Integer Overflow or Wraparound | CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop')


VersionSourceTypeScoreSeverityVector
3.1f86ef6dc-4d3a-42ad-8f28-e6d5547a5007Secondary5.9MEDIUMCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
3.1CNACVSS5.9MEDIUMCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Na PgBouncer affected 1.21.0 1.26.1 semver Not specified

References

ReferenceSourceLinkTags
www.pgbouncer.org/changelog.html f86ef6dc-4d3a-42ad-8f28-e6d5547a5007 www.pgbouncer.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Thanks to Brian Cosgrove (@cosgroveb) for finding and reporting this issue. (en)

Additional Advisory Data

Workarounds

CNA: Set max_packet_size to 2147483647 (the default) or lower.

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report