The post has been translated automatically. Original language: Russian
On September 23, 2026, PgBouncer 1.26.0 was released, a new version of the most common connection pool for PostgreSQL. The release closes three denial-of-service vulnerabilities, two of which are triggered before authentication, and changes the default behavior: the pool now monitors the search_path parameter.
Three security fixes
The first problem (CVE-2026-19888): PgBouncer did not verify that the client-final-message message in the SCRAM exchange contains a nonce. An unidentified client could drop the service with a single incorrect authentication message. The defect has existed since version 1.11.0, that is, since the introduction of SCRAM support.
The second (CVE-2026-6668): integer overflow in the packet buffer expansion logic led to an endless loop and service shutdown. It also works without authentication, with the default max_packet_size value.
Third (CVE-2026-6669): PgBouncer did not limit the number of SCRAM iterations it accepted from the server. A compromised PostgreSQL instance could force the pool to perform an unlimited amount of calculations when logging in. Now the iteration counter is limited to one million from above.
Parameter tracking and new pool settings
The list of monitored parameters has been expanded: search_path (for PostgreSQL 18 and later) and default_transaction_read_only (for PostgreSQL 14 and later) now they are tracked by default. The goal is to ensure that parameter changes by one client do not flow into other people's sessions in the transaction pool mode.
What else has appeared:
- pool_idle_timeout — deleting unused pools after downtime, disabled by default;
- query_wait_timeout is now configured separately for the user and the database;
- new statistics client_login_count — successful login counter;
- When logging in, PgBouncer sends its own ParameterStatus messages: version, pool mode, and the limit of prepared expressions.;
- build via Meson next to the former Autoconf, including builds for Windows UCRT64;
- The connection exclusion log now indicates the reason: the connection limit to the database, the pool size, or the user limit.
What was removed and what was repaired
The outdated online restart (the -R flag) and the SHOW FDS and SUSPEND commands have been removed. The maximum password length has been increased to 65535 bytes, as in libpq. Source code builds now require a C11-enabled compiler.
Among the fixes: accessing the released memory when the replication client was disconnected; TLS freezes when the packet hit the buffer boundary; incorrect response order to mixed Parse and Close packets for prepared expressions; credential corruption during SCRAM forwarding and failures after reconnecting to the server; processing COPY messages when the pool is exhausted in transaction mode; query_timeout more does not close idle connections; memory leaks when working with configuration.
What does this mean in practice?
The update should be considered urgent: two of the three defects do not require authentication, it is enough for the pool port to be accessible to the attacker. First of all, it is useful to check that the PgBouncer port is not published on the Internet and is closed by a firewall — this removes the edge of the problem even before updating the package.
The main behavioral surprise is not the vulnerabilities, but the search_path. If the application in transaction pool mode relied on the fact that the previously set search_path is saved between transactions, the behavior will become different. The change is enabled by default and will arrive with a regular package update, so it's better to run it on the test bench rather than find out about it in production.
It is worth reviewing the deployment and monitoring scripts separately: if there is a restart with the -R flag or data collection via SHOW FDS and SUSPEND, these places will stop working. The C11 compiler requirement will affect those who build PgBouncer themselves on older distributions. And pool_idle_timeout is useful where there are a lot of user—base pairs and some pools are idle: previously, such pools were kept indefinitely.
The draft text was prepared with the participation of AI, the facts were checked against the original source — the official notes for the release of PgBouncer 1.26.0 on the project's website.
23 сентября 2026 года вышел PgBouncer 1.26.0 — новая версия самого распространённого пула соединений для PostgreSQL. Выпуск закрывает три уязвимости класса «отказ в обслуживании», две из которых срабатывают до аутентификации, и меняет поведение по умолчанию: пул теперь отслеживает параметр search_path.
Три исправления безопасности
Первая проблема (CVE-2026-19888): PgBouncer не проверял, что сообщение client-final-message в обмене SCRAM содержит nonce. Неаутентифицированный клиент мог уронить сервис одним некорректным сообщением аутентификации. Дефект существовал с версии 1.11.0, то есть с момента появления поддержки SCRAM.
Вторая (CVE-2026-6668): целочисленное переполнение в логике расширения буфера пакетов приводило к бесконечному циклу и остановке обслуживания. Срабатывает тоже без аутентификации, при значении max_packet_size по умолчанию.
Третья (CVE-2026-6669): PgBouncer не ограничивал число итераций SCRAM, которое принимал от сервера. Скомпрометированный экземпляр PostgreSQL мог заставить пул выполнять неограниченный объём вычислений при входе. Теперь счётчик итераций ограничен сверху миллионом.
Отслеживание параметров и новые настройки пула
Список отслеживаемых параметров расширен: search_path (для PostgreSQL 18 и новее) и default_transaction_read_only (для PostgreSQL 14 и новее) теперь отслеживаются по умолчанию. Цель — чтобы изменение параметра одним клиентом не протекало в чужие сессии в режиме пула транзакций.
Что появилось ещё:
- pool_idle_timeout — удаление неиспользуемых пулов после простоя, по умолчанию выключено;
- query_wait_timeout теперь настраивается отдельно на пользователя и на базу;
- новая статистика client_login_count — счётчик успешных входов;
- при логине PgBouncer отдаёт собственные сообщения ParameterStatus: версию, режим пула и лимит подготовленных выражений;
- сборка через Meson рядом с прежним Autoconf, включая сборки для Windows UCRT64;
- в логе вытеснения соединений теперь указывается причина: лимит соединений к базе, размер пула или лимит пользователя.
Что убрали и что починили
Удалены устаревший онлайн-перезапуск (флаг -R) и команды SHOW FDS и SUSPEND. Максимальная длина пароля увеличена до 65535 байт — как в libpq. Для сборки из исходников теперь требуется компилятор с поддержкой C11.
Среди исправлений: обращение к освобождённой памяти при отключении клиента репликации; зависания TLS, когда пакет попадал на границу буфера; неверный порядок ответов на смешанные пакеты Parse и Close для подготовленных выражений; порча учётных данных при проброске SCRAM и отказы после переподключения к серверу; обработка сообщений COPY при исчерпании пула в режиме транзакций; query_timeout больше не закрывает простаивающие соединения; утечки памяти при работе с конфигурацией.
Что это значит на практике
Обновление стоит считать срочным: два из трёх дефектов не требуют аутентификации, достаточно, чтобы порт пула был доступен атакующему. Первым делом полезно проверить, что порт PgBouncer не опубликован в интернет и закрыт файрволом — это снимает острие проблемы даже до обновления пакета.
Главный поведенческий сюрприз — не уязвимости, а search_path. Если приложение в режиме пула транзакций опиралось на то, что установленный ранее search_path сохраняется между транзакциями, поведение станет другим. Изменение включено по умолчанию и приедет с обычным обновлением пакета, поэтому его лучше прогнать на тестовом стенде, а не узнать о нём в продакшене.
Отдельно стоит просмотреть скрипты деплоя и мониторинг: если там встречается перезапуск с флагом -R или сбор данных через SHOW FDS и SUSPEND, эти места перестанут работать. Требование компилятора C11 заденет тех, кто собирает PgBouncer сам на старых дистрибутивах. А pool_idle_timeout пригодится там, где пар «пользователь — база» много и часть пулов простаивает: раньше такие пулы держались бессрочно.
Черновик текста подготовлен с участием ИИ, факты сверены с первоисточником — официальные заметки к выпуску PgBouncer 1.26.0 на сайте проекта.