CVE-2026-6473
High · 8.8CVSS
8.8
EPSS
1.0%
Published
May 14, 2026
CISA due date
—
Cloudanix analysis
A flaw in PostgreSQL could let a low-level database user crash the database or potentially take control of the database server process if the system is not updated.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Network Service
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The vulnerability is an integer wraparound in multiple PostgreSQL server features. A low-privileged authenticated database user can cause PostgreSQL to calculate an allocation size incorrectly, allocate too small a memory buffer, and then write beyond the end of that buffer. Depending on memory layout and exploit reliability, this can crash the PostgreSQL backend process or potentially execute attacker-controlled code with the privileges of the operating-system account running PostgreSQL, commonly the database service account. The flaw affects PostgreSQL versions before 18.4, 17.10, 16.14, 15.18, and 14.23.
Why it matters to the business
A successful exploit can compromise the confidentiality, integrity, and availability of data managed by PostgreSQL. In the worst case, an attacker with only database-level access could gain code execution as the database service account, enabling data theft, data tampering, lateral movement from the database server, persistence through database-adjacent tooling, or service disruption. The vulnerability is not currently listed in CISA KEV, is not reported as ransomware-used, and has low EPSS at the time of assessment, but the CVSS severity is high and PostgreSQL is widely deployed in critical business applications, so exposed and multi-tenant database environments should prioritize patching.
How an attack unfolds
An attacker first obtains the ability to execute SQL or otherwise invoke affected PostgreSQL server functionality as an unprivileged database user. This may occur through valid low-privilege credentials, a compromised application account, or an application path that passes very large user-controlled input into the relevant database functions. The attacker then supplies gigabyte-scale or otherwise boundary-triggering input that causes an integer size calculation inside PostgreSQL to wrap. PostgreSQL allocates a buffer that is smaller than required and then writes past the end of that allocation. A simple attempt may terminate a backend process with a segmentation fault, causing connection loss and possible service instability. A more advanced exploit may shape memory contents and repeated attempts to achieve arbitrary code execution as the PostgreSQL operating-system user. From there, the attacker may access database files, read credentials available to the service account, modify stored data, install persistence where filesystem permissions allow, or pivot to other systems reachable from the database host.
How to fix it
Upgrade PostgreSQL to a fixed release for the deployed major version: PostgreSQL 18.4 or later, 17.10 or later, 16.14 or later, 15.18 or later, or 14.23 or later. If using vendor-packaged PostgreSQL, install the vendor security update that backports this fix and verify the resulting package maps to one of the fixed upstream releases or includes the relevant patch. Restart PostgreSQL after updating so all backend processes run the patched binaries. As interim risk reduction, restrict direct database access to trusted application servers and administrative networks, remove unnecessary database accounts, enforce least privilege for application database users, monitor and limit application paths that can submit unusually large values to PostgreSQL functions, and consider connection- or statement-level controls that reduce the ability to process gigabyte-scale attacker-controlled input. Mitigations should not be treated as a substitute for patching because the flaw is memory corruption with potential code execution.
How to confirm the fix worked
Confirm the running PostgreSQL version with SELECT version(); or postgres --version and verify it is PostgreSQL 18.4+, 17.10+, 16.14+, 15.18+, or 14.23+ depending on the major branch in use. Validate that the database service has been restarted after package installation by checking process start times and package installation timestamps. For vendor distributions, confirm the package changelog or advisory explicitly includes the fix for this vulnerability. Review application dependency containers, database appliances, managed images, and standby/replica hosts because PostgreSQL binaries may be present outside the primary server. Exposure exists where untrusted or low-privileged users can execute SQL against affected PostgreSQL servers, or where applications pass very large user-controlled inputs into affected PostgreSQL server features.
Typical attack path
- Obtain authenticated access to PostgreSQL as a low-privileged database user or reach an application path that submits attacker-controlled large input to PostgreSQL.
- Identify database functions or server features that process large attacker-controlled values and are reachable by the current privileges.
- Submit crafted oversized input that triggers the integer wraparound during allocation-size calculation.
- Cause PostgreSQL to allocate an undersized memory buffer and perform an out-of-bounds write.
- Observe backend crashes, connection resets, or PostgreSQL recovery events while refining the payload.
- If exploit development is successful, gain code execution as the operating-system user running the PostgreSQL service.
- Use database service-account access to read or alter data, access local files permitted to the service account, collect secrets, or disrupt database availability.
How to detect it
Look for signs of attempted exploitation in PostgreSQL server logs, operating-system logs, crash dumps, core files, and application logs that submit unusually large values to the database. PostgreSQL exploitation attempts are likely to appear as backend process crashes, segmentation faults, abrupt connection termination, postmaster recovery activity, or repeated failures involving very large SQL statements or parameters. Review logs around any PostgreSQL crash for the authenticated database user, source IP, application name, database name, and the last statement logged if statement logging or error verbosity was enabled. On Linux, inspect syslog, journald, auditd, kernel logs, and systemd service logs for postgres processes receiving SIGSEGV or producing core dumps. Check filesystem locations configured by core_pattern, systemd-coredump, apport, ABRT, or equivalent crash handlers for postgres core artifacts. Investigate any unexpected child processes, shell execution, outbound network connections, or file modifications made by the PostgreSQL operating-system user after a crash, as those may indicate progression from denial of service to code execution. Detection is inherently behavioral because no universal exploit string is provided and crash indicators are not specific to this vulnerability.
- server process .* was terminated by signal 11: Segmentation fault
- terminating any other active server processes
- all server processes terminated; reinitializing
- database system is in recovery mode
- database system was interrupted; last known up at
- postmaster: .* was terminated by signal 11
- postgres: .* was terminated by signal 11
- kernel: postgres.*segfault
- kernel: postmaster.*segfault
- systemd-coredump.*postgres
- systemd-coredump.*postmaster
- core.postgres
- core.postmaster
- /var/lib/systemd/coredump/
- /var/crash/
- /var/spool/abrt/
- connection to server was lost
- server closed the connection unexpectedly
What your security team should do
- Patch PostgreSQL to 18.4, 17.10, 16.14, 15.18, or 14.23 or later, prioritizing internet-reachable, partner-accessible, multi-tenant, and high-value database servers.
- Inventory all PostgreSQL instances, including replicas, containers, developer images, embedded deployments, and vendor-packaged distributions.
- Restrict direct PostgreSQL network access to trusted hosts and remove unnecessary low-privilege database accounts.
- Review application paths that allow large user-controlled values to be passed into database functions, and apply size limits where operationally feasible.
- Increase monitoring for PostgreSQL backend crashes, segmentation faults, repeated connection resets, and unexpected postmaster recovery messages until all instances are patched.
- Audit database roles and service-account operating-system permissions to reduce the impact of possible code execution as the PostgreSQL user.
- After patching, verify the active server version and restart status rather than relying only on package installation records.
- Because there is no current KEV listing, no known ransomware association, and no public exploit maturity reported, balance emergency response with standard high-severity patch SLAs, but do not defer remediation on critical database systems.
The record
Integer wraparound in multiple PostgreSQL server features allows an unprivileged database user to cause the server to undersize an allocation and write out-of-bounds. This may execute arbitrary code as the operating system user running the database. In applications that pass gigabyte-scale user inputs to the relevant database functions, the application input provider may achieve a segmentation fault. Versions before PostgreSQL 18.4, 17.10, 16.14, 15.18, and 14.23 are affected.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| openSUSE:Leap 16.0 | postgresql14 | 0 | 14.23-160000.1.1 |
| openSUSE:Leap 16.0 | postgresql15 | 0 | 15.18-160000.1.1 |
| openSUSE:Leap 16.0 | postgresql16 | 0 | 16.14-160000.1.1 |
| openSUSE:Leap 16.0 | postgresql17 | 0 | 17.10-160000.1.1 |
| openSUSE:Tumbleweed | postgresql14 | 0 | 14.23-1.1 |
| openSUSE:Tumbleweed | postgresql15 | 0 | 15.18-1.1 |
| openSUSE:Tumbleweed | postgresql16 | 0 | 16.14-1.1 |
| openSUSE:Tumbleweed | postgresql17 | 0 | 17.10-1.1 |
| openSUSE:Tumbleweed | postgresql18 | 0 | 18.4-1.1 |
Related vulnerabilities
- CVE-2026-6637 Stack buffer overflow in PostgreSQL module "refint" allows an unprivileged database user… Also affects postgresql14
- CVE-2026-6478 Covert timing channel in comparison of MD5-hashed password in PostgreSQL authentication… Also affects postgresql14
- CVE-2026-6479 Uncontrolled recursion in PostgreSQL SSL and GSS negotiation allows an attacker able to… Also affects postgresql14
- CVE-2026-6475 Symlink following in PostgreSQL pg_basebackup plain format and in pg_rewind allows an… Also affects postgresql14
- CVE-2026-6477 Use of inherently dangerous function PQfn(..., result_is_int=0, ...) in PostgreSQL libpq… Also affects postgresql14
- CVE-2026-6472 Missing authorization in PostgreSQL CREATE TYPE allows an object creator to hijack other… Also affects postgresql14
- CVE-2026-6474 Externally-controlled format string in PostgreSQL timeofday() function allows an attacker… Also affects postgresql14
- CVE-2026-2005 Heap buffer overflow in PostgreSQL pgcrypto allows a ciphertext provider to execute… Also affects postgresql14