Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

jackc/pgproto3
master @ bc04164
2
Fixes
2
CVEs
CRITICAL
Peak severity
0.0%
Coverage
Highlights
Auth Bypass: 1 prior fix. Scrutinize any change in this area.
authentication_md5_password.go: most-fixed (1 issue). Treat as high-risk during review.
2 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Integer Overflow: Integer wrapping and overflow during message size calculations (as tracked in CVE-2024-27304 and patched in commit 945c212) allow attackers to segment large messages into multiple smaller messages, leading to arbitrary protocol message injection or SQL injection. Ensuring strict bounds checks prior to serialization is critical.
Auth Bypass: Misconfigured authentication type identifiers (such as using AuthTypeOk instead of AuthTypeMD5Password) lead to protocol state confusion, potentially bypassing authentication barriers by tricking the client or server into an incorrect state transition.
Integer Overflow: Improper validation of field lengths in decoded structures (e.g., DataRow.Decode as tracked in CVE-2026-32286) can cause negative field lengths to induce panic-driven denials of service when connecting to malicious or compromised backend servers.