CyberSecBulletin
CVE-2026-6477NVD status: Modified

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.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update PostgreSQL to 18.4 or 17.10 or 16.14 or 15.18, whichever matches your release line, or a later version.
  2. Read the advisory on postgresql.org for workarounds and exact fixed builds.
  3. Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
  4. 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

VendorProductAffected versionsFixed in
PostgreSQLPostgreSQL18 up to, but not including, 18.4; 17 up to, but not including, 17.10; 16 up to, but not including, 16.14; 15 up to, but not including, 15.18; before 14.2318.4, 17.10, 16.14, 15.18, 14.23
Red HatRed Hat Enterprise Linux 10Not specified in the recordNot stated
Red HatRed Hat Enterprise Linux 10.0 Extended Update SupportNot specified in the recordNot stated
Red HatRed Hat Enterprise Linux 7 Extended Lifecycle SupportNot specified in the recordNot stated
Red HatRed Hat Enterprise Linux 8Not specified in the recordNot stated
Red HatRed Hat Enterprise Linux 8.4 Advanced Mission Critical Update SupportNot specified in the recordNot stated
Red HatRed Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-OnNot specified in the recordNot stated
Red HatRed Hat Enterprise Linux 8.6 Advanced Mission Critical Update SupportNot specified in the recordNot stated
Red HatRed Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-OnNot specified in the recordNot stated
Red HatRed Hat Enterprise Linux 8.8 Telecommunications Update ServiceNot specified in the recordNot stated
Red HatRed Hat Enterprise Linux 8.8 Update Services for SAP SolutionsNot specified in the recordNot stated
Red HatRed Hat Enterprise Linux 9Not specified in the recordNot stated
Red HatRed Hat Enterprise Linux 9.2 Update Services for SAP SolutionsNot specified in the recordNot stated
Red HatRed Hat Enterprise Linux 9.4 Update Services for SAP SolutionsNot specified in the recordNot stated
Red HatRed Hat Enterprise Linux 9.6 Extended Update SupportNot specified in the recordNot stated
Red HatRed Hat Discovery 2Not specified in the recordNot stated
Red HatRed Hat Hardened ImagesNot specified in the recordNot stated
Red HatRed Hat Update Infrastructure 5Not specified in the recordNot stated
Red HatRed Hat Enterprise Linux 6Not specified in the recordNot stated
Red HatSelf-service automation portal 2Not specified in the recordNot stated

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 systemScoreSeverityScored by
CVSS 3.18.8HighCNA
CVSS 3.18.4HighCNA

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

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
  3. Record last changed materially (score, affected products, status or references).

References

Other vulnerabilities in PostgreSQL

All PostgreSQL vulnerabilities

Recent Use of Inherently Dangerous Function vulnerabilities

Spotted an error? Tell us.