{"id":"UBUNTU-CVE-2026-6665","details":"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.","modified":"2026-05-20T16:26:56.721693168Z","published":"2026-05-09T01:16:00Z","upstream":["CVE-2026-6665"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2026-6665"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2026-6665"},{"type":"REPORT","url":"https://www.pgbouncer.org/changelog.html#pgbouncer-125x"}],"affected":[{"package":{"name":"pgbouncer","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/pgbouncer?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5.5-1","1.6.1-1","1.7-1"],"ecosystem_specific":{"binaries":[{"binary_version":"1.7-1","binary_name":"pgbouncer"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-6665.json"}},{"package":{"name":"pgbouncer","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/pgbouncer?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.7.2-3build1","1.7.2-65-g2b8e6cf-1","1.8.1-1","1.8.1-1build1"],"ecosystem_specific":{"binaries":[{"binary_name":"pgbouncer","binary_version":"1.8.1-1build1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-6665.json"}},{"package":{"name":"pgbouncer","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/pgbouncer?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.10.0-1","1.10.0-1build1","1.11.0-1","1.12.0-2","1.12.0-3"],"ecosystem_specific":{"binaries":[{"binary_name":"pgbouncer","binary_version":"1.12.0-3"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-6665.json"}},{"package":{"name":"pgbouncer","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/pgbouncer?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.15.0-1","1.16.1-1ubuntu1"],"ecosystem_specific":{"binaries":[{"binary_version":"1.16.1-1ubuntu1","binary_name":"pgbouncer"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-6665.json"}},{"package":{"name":"pgbouncer","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/pgbouncer?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.20.0-1","1.21.0-1","1.22.0-1","1.22.0-1build1","1.22.0-1build3","1.22.0-1build4"],"ecosystem_specific":{"binaries":[{"binary_version":"1.22.0-1build4","binary_name":"pgbouncer"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-6665.json"}},{"package":{"name":"pgbouncer","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/pgbouncer?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.24.0-3","1.24.1-1"],"ecosystem_specific":{"binaries":[{"binary_name":"pgbouncer","binary_version":"1.24.1-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-6665.json"}},{"package":{"name":"pgbouncer","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/pgbouncer?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.24.1-1","1.25.0-2","1.25.1-1"],"ecosystem_specific":{"binaries":[{"binary_name":"pgbouncer","binary_version":"1.25.1-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-6665.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}