{"id":"CVE-2026-6665","aliases":["AZL-86237","BIT-pgbouncer-2026-6665","DEBIAN-CVE-2026-6665","EUVD-2026-28877","GHSA-mhmx-mjv6-w337","UBUNTU-CVE-2026-6665"],"status":"published","title":"PgBouncer buffer overflow in SCRAM","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.","severity":{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00372,"percentile":0.31369,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-121"],"published":"2026-05-09T00:43:46Z","modified":"2026-10-17T12:56:41Z","fixes":[{"ecosystem":"Azure Linux:3","package":"pgbouncer","fixed_in":["1.25.2-1"],"sources":["osv"]},{"ecosystem":"Bitnami","package":"pgbouncer","fixed_in":["1.25.2"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"pgbouncer","fixed_in":["1.24.1-1+deb13u2"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"pgbouncer","fixed_in":["1.25.2-1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Azure Linux:3","package":"pgbouncer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.25.2-1"}]}]},{"source":"osv","ecosystem":"Bitnami","package":"pgbouncer","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.25.2"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"pgbouncer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.18.0-1","1.18.0-1+deb12u1","1.19.0-1","1.19.1-1","1.20.0-1","1.20.1-1","1.21.0-1","1.22.0-1","1.22.1-1","1.23.0-1","1.23.1-1","1.24.0-2","1.24.0-3","1.24.1-1","1.25.0-1","1.25.0-2","1.25.1-1","1.25.2-1","1.26.0-1","1.26.0-2","1.26.0-3","1.26.0-4"]},{"source":"osv","ecosystem":"Debian:13","package":"pgbouncer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.24.1-1+deb13u2"}]}],"versions":["1.24.1-1","1.24.1-1+deb13u1"]},{"source":"osv","ecosystem":"Debian:14","package":"pgbouncer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.25.2-1"}]}],"versions":["1.24.1-1","1.25.0-1","1.25.0-2","1.25.1-1"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"pgbouncer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5.5-1","1.6.1-1","1.7-1"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"pgbouncer","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"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"pgbouncer","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"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"pgbouncer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.15.0-1","1.16.1-1ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"pgbouncer","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"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"pgbouncer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.24.0-3","1.24.1-1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"pgbouncer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.25.1-1","1.25.2-1","1.25.2-1ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"pgbouncer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.24.1-1","1.25.0-2","1.25.1-1"]}],"products":[{"vendor":"pgbouncer","product":"pgbouncer"}],"references":[{"url":"https://www.pgbouncer.org/changelog.html#pgbouncer-125x","tags":["Release Notes","article","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-6665","tags":["web"]},{"url":"https://github.com/advisories/GHSA-mhmx-mjv6-w337"},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-6665","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-6665","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-6665","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-6665","title":"PgBouncer buffer overflow in SCRAM","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.","status":"published","published":"2026-05-09T00:43:46.762Z","modified":"2026-05-12T03:55:19.823Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-121"],"updated_at":"2026-11-02T13:50:04.986624Z"}],"euvd":[{"id":"EUVD-2026-28877","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.","status":"published","published":"2026-05-09T00:43:46Z","modified":"2026-05-12T03:55:19Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T19:04:38.653286Z"}],"ghsa":[{"id":"GHSA-mhmx-mjv6-w337","title":"The SCRAM code in PgBouncer before 1.25.2 did not check the return value of strlcat() correctly...","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.","status":"published","published":"2026-05-09T03:31:21Z","modified":"2026-05-09T03:31:22Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-121"],"updated_at":"2026-11-02T15:07:58.197878Z"}],"nvd":[{"id":"CVE-2026-6665","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.","status":"published","published":"2026-05-09T01:16:09.013Z","modified":"2026-07-24T08:10:00.15Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"}],"cwes":["CWE-121"],"updated_at":"2026-11-02T14:12:18.239974Z"}],"osv":[{"id":"DEBIAN-CVE-2026-6665","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.","status":"published","published":"2026-05-09T01:16:09.013Z","modified":"2026-10-01T03:03:39.137846965Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:45:58.699079Z"},{"id":"UBUNTU-CVE-2026-6665","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.","status":"published","published":"2026-05-09T01:16:00Z","modified":"2026-10-17T12:56:41.70328865Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T16:56:53.710209Z"},{"id":"AZL-86237","title":"CVE-2026-6665 affecting package pgbouncer for versions less than 1.25.2-1","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.","status":"published","published":"2026-05-09T01:16:09Z","modified":"2026-08-28T17:56:41.850038Z","updated_at":"2026-11-02T15:28:10.677811Z"},{"id":"BIT-pgbouncer-2026-6665","title":"PgBouncer buffer overflow in SCRAM","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.","status":"published","published":"2026-05-12T08:52:51.85Z","modified":"2026-09-08T08:47:47.470950791Z","updated_at":"2026-11-02T15:28:34.343258Z"}]}}
