---
id: CVE-2026-56873
aliases:
  - GO-2026-6172
title: >-
  Backend frame lengths cause pre-validation memory exhaustion in
  github.com/lib/pq
summary: >-
  Backend frame lengths cause pre-validation memory exhaustion in
  github.com/lib/pq
severity: none
vendor: lib
product: github.com/lib/pq
ecosystem: go
affected:
  - github.com/lib/pq >= 1.0.0
published: '2026-08-18'
updated: '2026-08-18'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GO-2026-6172'
references:
  - url: 'https://github.com/golang/vulndb/issues/6172'
tags:
  - osv
  - go
ingestedAt: '2026-08-18T19:21:39.166Z'
---

## Overview

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.

## Affected packages

- `github.com/lib/pq >= 1.0.0`

## Remediation

Refer to the advisory for the patched release.
