CVE-2026-116328
Description
A flaw was found in PostgreSQL. An integer wraparound vulnerability in memory context management allows an authenticated database user to execute arbitrary code with the privileges of the operating system user running the database. By freeing a memory allocation exceeding one gigabyte (1 GB), the system improperly reuses memory blocks due to an offset calculation error, resulting in memory corruption.
Statement
Red Hat rates this vulnerability as Important rather than Critical because exploitation requires existing database user credentials, yet enables arbitrary code execution within the operating system context of the PostgreSQL daemon. By default on Red Hat Enterprise Linux, PostgreSQL is configured to accept only local connections, limiting exposure unless remote network access has been specifically granted. Any authenticated user capable of executing resource-intensive queries that trigger large memory allocations can induce this memory corruption, though releases prior to PostgreSQL 16 remain unaffected.
Mitigation
Limit network access to the PostgreSQL service to trusted hosts or localhost to restrict exposure to untrusted networks.
1. Restrict PostgreSQL network access using firewalld to only trusted management subnets:
firewall-cmd --permanent --remove-service=postgresql
firewall-cmd --permanent --zone=trusted --add-source=192.168.1.0/24
firewall-cmd --reload
2. Alternatively, ensure the server only binds to loopback interfaces by setting `listen_addresses = 'localhost'` in the PostgreSQL configuration and reloading the service:
systemctl reload postgresql
Caveats:
Restricting network access only limits the attack surface from external untrusted networks. It does not prevent exploitation by authenticated database users connecting from permitted IP addresses or via local connections.
Warning:
Reloading firewall rules or the PostgreSQL service modifies active connection filtering and client sessions. Plan and test these configuration adjustments to avoid unintended service interruption.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
The following CVSS metrics and score provided are preliminary and subject to review.
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 8.8 | N/A | 8.8 |
| Attack Vector | Network | N/A | Network |
| Attack Complexity | Low | N/A | Low |
| Privileges Required | Low | N/A | Low |
| User Interaction | None | N/A | None |
| Scope | Unchanged | N/A | Unchanged |
| Confidentiality | High | N/A | High |
| Integrity Impact | High | N/A | High |
| Availability Impact | High | N/A | High |
Vector
Red Hat: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
cve.org: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Understanding the Weakness (CWE)
Availability
Technical Impact: DoS: Crash, Exit, or Restart; DoS: Resource Consumption (Memory); DoS: Instability
This weakness can generally lead to undefined behavior and therefore crashes. When the calculated result is used for resource allocation, this weakness can cause too many (or too few) resources to be allocated, possibly enabling crashes if the product requests more resources than can be provided. If the calculated result involves time values, then the product might crash when it encounters a time that is less than the previously-calculated time.
Integrity
Technical Impact: Modify Memory
If the value in question is important to data (as opposed to flow), simple data corruption has occurred. Also, if the overflow/wraparound results in other conditions such as buffer overflows, further memory corruption may occur.
Confidentiality,Availability,Access Control
Technical Impact: Execute Unauthorized Code or Commands; Bypass Protection Mechanism
This weakness can sometimes trigger buffer overflows, which can be used to execute arbitrary code. This is usually outside the scope of the product's implicit security policy.
Availability,Other
Technical Impact: Alter Execution Logic; DoS: Crash, Exit, or Restart; DoS: Resource Consumption (CPU)
If the overflow/wraparound occurs in a loop index variable, this could cause the loop to terminate at the wrong time - too early, too late, or not at all (i.e., infinite loops). With too many iterations, some loops could consume too many resources such as memory, file handles, etc., possibly leading to a crash or other DoS.
Access Control
Technical Impact: Bypass Protection Mechanism
If integer values are used in security-critical decisions, such as calculating quotas or allocation limits, integer overflows can be used to cause an incorrect security decision.
Access Control
Technical Impact: Bypass Protection Mechanism; DoS: Crash, Exit, or Restart
If integer values are used in time-based, security-critical decisions, such as calculating expiration times or determining whether an event occurs within a specific time or date range, to cause an incorrect security decision. The consequences could even include "self-DoS" if the overflow produces a time value that is not accounted for in protection mechanism logic [REF-1570].
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.