CVE-2024-10977
postgresql: PostgreSQL libpq retains an error message from man-in-the-middle
Severity
LowRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · November 14, 2024
Updated · June 30, 2026
Description
A flaw was found in PostgreSQL's error message handling. This vulnerability allows a Man-in-the-middle attacker to inject arbitrary non-NUL bytes into the libpq application via a server error message.
Statement
This vulnerability affects PostgreSQL clients that handle error messages from untrusted servers, which may cause error messages to be misinterpreted as valid query results.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Make sure PostgreSQL is configured to use trusted SSL or GSS settings to prevent untrusted servers from sending error messages. Additionally, when interpreting output from the psql command line interface, make sure to distinguish between error messages and valid data.
CVSS / CWE
CVSS 3.1 · 3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N
CWE-348 · Use of Less Trusted Source