CVE-2026-116319

Description

A flaw was found in PostgreSQL. An authenticated database user with permission to create objects can trigger a use-after-free memory flaw in the PL/Perl procedural language extension through reentrant return_next() calls. This vulnerability allows the user to execute arbitrary code on the host system as the operating system user running the database.

Statement

This vulnerability is rated as having Important impact because an authenticated database user with permissions to define functions or objects can exploit a memory corruption flaw to achieve arbitrary code execution in the context of the postgres system user. While successful exploitation grants system-level access under the PostgreSQL process account, the PL/Perl procedural language extension is not enabled by default in standard Red Hat deployments. Consequently, systems that do not explicitly install and enable PL/Perl or that restrict object creation privileges to trusted administrators are not exposed to this issue.

Mitigation

Remove the optional PL/Perl package if it is not required by your applications:

# dnf remove postgresql-plperl

Alternatively, drop the PL/Perl extension from affected databases:

DROP EXTENSION IF EXISTS plperl CASCADE;
DROP EXTENSION IF EXISTS plperlu CASCADE;

If the extension is required, restrict execution privileges by revoking usage on the language from untrusted database roles:

REVOKE USAGE ON LANGUAGE plperl FROM PUBLIC;

Caveats: Dropping the extension or removing the package will break existing stored procedures and database applications that depend on PL/Perl. Revoking USAGE permissions prevents unprivileged users from executing PL/Perl functions.

Warning: Restarting or reloading the PostgreSQL service (e.g., `systemctl restart postgresql`) may be necessary to terminate existing database sessions and apply changes fully, which will temporarily interrupt active client connections.

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 HatNVDcve.org
Base Score8.8N/A8.8
Attack VectorNetworkN/ANetwork
Attack ComplexityLowN/ALow
Privileges RequiredLowN/ALow
User InteractionNoneN/ANone
ScopeUnchangedN/AUnchanged
ConfidentialityHighN/AHigh
Integrity ImpactHighN/AHigh
Availability ImpactHighN/AHigh

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)

Confidentiality

Technical Impact: Read Memory

If the expired pointer is used in a read operation, an attacker might be able to control data read in by the application.

Availability

Technical Impact: DoS: Crash, Exit, or Restart

If the expired pointer references a memory location that is not accessible to the product, or points to a location that is "malformed" (such as NULL) or larger than expected by a read or write operation, then a crash may occur.

Integrity,Confidentiality,Availability

Technical Impact: Execute Unauthorized Code or Commands

If the expired pointer is used in a function call, or points to unexpected data in a write operation, then code execution may be possible.

Frequently Asked Questions

Want to get errata notifications? Sign up here.