
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-6464 is a vulnerability in the PostgreSQL psql client's COPY FROM STDIN command that allows untrusted data rows to be executed as psql commands via error injection. When a COPY FROM STDIN or \copy FROM STDIN command fails before the server signals readiness for input rows, psql incorrectly processes the inline data rows as psql commands rather than data. Affected versions include PostgreSQL 14.x before 14.24, 15.x before 15.19, 16.x before 16.15, 17.x before 17.11, and 18.x before 18.5. The vulnerability carries a CVSS v3.1 base score of 8.1 (High) (PostgreSQL Advisory).
The root cause is classified as CWE-829 (Inclusion of Functionality from Untrusted Control Sphere): when a COPY FROM STDIN operation encounters a server-side error before the server enters data-receive mode, the psql client falls through to interpreting the pending inline data rows as interactive psql meta-commands or SQL statements. COPY FROM with a filename is not affected because the data path differs. A complete attack requires an adversary to control both the PostgreSQL server (to trigger the error condition) and the data rows being copied; alternatively, an attacker controlling only the data rows could exploit a coincidental, uncontrolled server error to achieve the same effect (PostgreSQL Advisory).
Successful exploitation can result in arbitrary psql command execution in the context of the connecting client, leading to high confidentiality, integrity, and availability impact. An attacker could read or modify database contents, execute server-side commands via psql meta-commands (e.g., \!), or disrupt database availability. Because the attack is network-reachable and requires no authentication on its own (though it does require control of the server or data rows), the potential blast radius includes any system or data accessible to the psql session (PostgreSQL Advisory).
As of the time of publication, there is no public proof-of-concept exploit and no evidence of in-the-wild exploitation (PostgreSQL Advisory). The EPSS score is approximately 0.49%, reflecting low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation is rated as non-automatable by NVD SSVC analysis, given the requirement to control both the server and data rows (or rely on a coincidental error).
COPY FROM STDIN operation where the inline data rows contain valid psql meta-commands (e.g., \! id or \copy ... to ...) that would be harmful if executed as commands.COPY FROM STDIN or \copy FROM STDIN command to fail on the server side before the server sends the signal indicating it is ready to receive input rows (e.g., by causing a permission error, constraint violation at parse time, or other server-side rejection).\!, or perform other privileged actions within the psql session's permission scope (PostgreSQL Advisory).COPY FROM STDIN commands that result in early errors (before the stdin data phase), particularly from unexpected client IPs or service accounts.\!, \copy, \o) immediately following a failed COPY FROM STDIN statement.\!) on the host running the psql client.COPY FROM STDIN connection attempts to PostgreSQL servers from external or untrusted network sources.Upgrade PostgreSQL to the patched versions: 18.5, 17.11, 16.15, 15.19, or 14.24 (PostgreSQL Advisory, PostgreSQL Release). As interim mitigations, restrict network access to PostgreSQL servers using firewalls or pg_hba.conf rules, and limit which users or applications are permitted to execute COPY FROM STDIN operations. Monitor for suspicious COPY FROM STDIN usage patterns that result in server errors, and audit psql client environments for unexpected command execution.
The PostgreSQL project disclosed the vulnerability alongside a coordinated release of patched versions on August 13, 2026 (PostgreSQL Release). Downstream Linux distributions including Debian and Ubuntu issued security advisories and package updates shortly after (Ubuntu Advisory). Security scanning vendors including Tenable/Nessus added detection plugins for the vulnerability. Community commentary noted that the attack complexity is high due to the dual-control requirement, limiting immediate risk for most deployments.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."