VDB
KO

GO-2026-6172

Backend frame lengths cause pre-validation memory exhaustion in github.com/lib/pq

Details

github.com/lib/pq allocates the backend-declared PostgreSQL frame payload before applying a protocol length bound or a phase-specific message-type check. A malicious server or active network attacker on an unauthenticated connection can send frame headers declaring multi-gigabyte or invalid-phase payloads, forcing large allocations that lead to memory exhaustion and runtime out-of-memory crashes.

Are you affected?

Enter the version of the package you're using.

Affected packages

Go / github.com/lib/pq
Introduced in: 1.0.0

No fixed version published yet for github.com/lib/pq (go modules). Pin to a known-safe version or switch to an alternative.

References