PostgreSQL credcheck 6.0 adds PgBouncer integration, last-login history
The credcheck PostgreSQL extension version 6.0 integrates its authentication failure and first-login password change features with PgBouncer, adds a last-login history modeled on Unix wtmp, and fixes a privilege escalation vulnerability and memory safety bugs.
Summary
HexaCluster has released credcheck 6.0, a major update to the PostgreSQL credential-checking extension. The release adds PgBouncer compatibility for two previously unsupported features, introduces session logging comparable to Unix last/wtmp, and provides a new function to test passwords against policy without modifying roles. It also patches a privilege escalation via self-ALTER ROLE, memory leaks, and a heap overflow. Administrators must restart PostgreSQL to load the updated library.
What's new in credcheck 6.0
- PgBouncer integration: max_auth_failure and password_change_first_login now work with PgBouncer, extending these protections to pooled connection environments
- credcheck.password_valid_min: forces a short VALID UNTIL window on new roles, ensuring password changes when clients like DBeaver or pgAdmin cannot handle the first-login error
- last-login history: optional wtmp-style session logging records username, login time, duration, backend PID, source IP/port, and optionally the last SQL query; also tracks PostgreSQL boot/shutdown/crash events
- pg_check_password() function: validates a candidate password against credcheck policy without requiring CREATE ROLE or ALTER ROLE
- Security fixes: privilege escalation via self-ALTER ROLE when password_valid_until is set, plus memory leaks and heap overflow
- Logging change: no_password_logging now replaces PASSWORD '<literal>' with dots inline rather than hiding the entire error statement
- Upgrade requirement: PostgreSQL restart needed to reload the credcheck library
Why it matters
The PgBouncer integration addresses a real deployment gap, as many production PostgreSQL setups rely on connection pooling. The privilege escalation and heap overflow fixes warrant prompt upgrades for security-conscious installations.
Original reference: www.postgresql.org →