CVE-2026-116320

Description

A flaw was found in PostgreSQL. An authenticated database user can achieve arbitrary code execution with the privileges of the operating system user running the database due to a use-after-free vulnerability in the PL/Perl procedural language. This issue occurs when the final reference to a Perl array or hash is dropped while PostgreSQL is converting the object, resulting in memory corruption.

Statement

This vulnerability is rated as an Important severity rather than Critical because exploitation requires valid database authentication and the capability to create or execute PL/Perl procedures, though successful exploitation enables arbitrary code execution as the database server process owner. In default Red Hat Enterprise Linux installations, the PL/Perl procedural language is packaged separately and is not enabled by default. Consequently, environments are only exposed if this optional extension has been explicitly installed and untrusted users have permission to define or run PL/Perl routines.

Mitigation

Remove the optional PL/Perl package if procedural Perl functions are not required, or restrict language usage permissions to trusted administrators only.

To remove the optional package:
# dnf remove postgresql-plperl

Alternatively, revoke usage of the PL/Perl languages from untrusted database users:
REVOKE USAGE ON LANGUAGE plperl FROM PUBLIC;
REVOKE USAGE ON LANGUAGE plperlu FROM PUBLIC;

Caveats: Removing the package or revoking language permissions will cause stored procedures and application queries dependent on PL/Perl to fail.

Warning: Existing active database sessions that have already loaded the plperl shared object must be terminated, or the PostgreSQL service restarted, for the removal to take effect across all sessions.

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.