PostgreSQL: Use of Inherently Dangerous Function
CVE-2026-6477 is a high-severity use of inherently dangerous function vulnerability in PostgreSQL, with a CVSS 3.1 base score of 8.8 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, but only if a user takes part, for example by opening a link or file. The record lists versions 18.4, 17.10, 16.14 as the first without the flaw, so updating PostgreSQL to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.45% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update PostgreSQL to 18.4 or 17.10 or 16.14 or 15.18, whichever matches your release line, or a later version.
- Read the advisory on postgresql.org for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
- Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.
Affected products and versions
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- RequiredA user must take an action such as opening a file or link.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H. Scored by CNA.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 8.8 | High | CNA |
| CVSS 3.1 | 8.4 | High | CNA |
Official description
Use of inherently dangerous function PQfn(..., result_is_int=0, ...) in PostgreSQL libpq lo_export(), lo_read(), lo_lseek64(), and lo_tell64() functions allows the server superuser to overwrite a client stack buffer with an arbitrarily-large response. Like gets(), PQfn(..., result_is_int=0, ...) stores arbitrary-length, server-determined data into a buffer of unspecified size. Because both the \lo_export command in psql and pg_dump call lo_read(), the server superuser can overwrite pg_dump or psql stack memory. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Use of Inherently Dangerous Function
The product calls a function that can never be guaranteed to work safely, regardless of how it is used.
How developers prevent this class of flaw
- Identify a list of prohibited API functions and prohibit developers from using these functions, providing safer alternatives. In some cases, automatic code analysis tools or the compiler can be instructed to spot use of prohibited functions, such as the banned.h include file from Microsoft's SDL.
- Use grep or static analysis tools to spot usage of dangerous functions.
More Use of Inherently Dangerous Function vulnerabilities (CWE-242)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Other references
- access.redhat.com/errata/RHSA-2026:21182
- access.redhat.com/errata/RHSA-2026:22878
- access.redhat.com/errata/RHSA-2026:26181
- access.redhat.com/errata/RHSA-2026:26203
- access.redhat.com/errata/RHSA-2026:26204
- access.redhat.com/errata/RHSA-2026:26524
- access.redhat.com/errata/RHSA-2026:26525
- access.redhat.com/errata/RHSA-2026:26561
- access.redhat.com/errata/RHSA-2026:27718
- access.redhat.com/errata/RHSA-2026:27738
- access.redhat.com/errata/RHSA-2026:27741
- access.redhat.com/errata/RHSA-2026:27742
- access.redhat.com/errata/RHSA-2026:27743
- access.redhat.com/errata/RHSA-2026:28037
- access.redhat.com/errata/RHSA-2026:28143
Other vulnerabilities in PostgreSQL
- 7.2 High severity
- 8.8 High severity
- 8.8 High severity
- 8.1 High severity
- 7.2 High severity
- 8.8 High severity
Recent Use of Inherently Dangerous Function vulnerabilities
- 7.8 High severity
- 7.8 High severity
- 9.8 Critical severity
- 8.8 High severity
Spotted an error? Tell us.