CVE-2026-116323

Description

A flaw was found in PostgreSQL. A use-after-free vulnerability in the PL/Tcl procedural language extension occurs when evaluating domain CHECK constraints that re-enter the Tcl interpreter. An authenticated database user with privileges to create objects can exploit this flaw to execute arbitrary code as the operating system user running the database service.

Statement

Red Hat rates this vulnerability as Important because an authenticated user with permission to create database objects can achieve arbitrary code execution under the postgres operating system account. In standard Red Hat Enterprise Linux deployments, the PL/Tcl procedural language is neither installed nor enabled by default, significantly limiting exposure on typical systems. Risk is primarily confined to environments where the optional PL/Tcl subpackage is explicitly installed and untrusted users have been granted object creation privileges.

Mitigation

If PL/Tcl is not required, remove the optional procedural language package or drop the extension from affected databases. Alternatively, restrict object creation permissions for untrusted database accounts.

1. To remove the optional PL/Tcl package:
# dnf remove postgresql-pltcl

2. To remove the extension from a specific database, execute the following SQL commands as a database administrator:
DROP EXTENSION IF EXISTS pltcl CASCADE;
DROP EXTENSION IF EXISTS pltclu CASCADE;

3. To prevent untrusted accounts from creating custom domains or objects, revoke schema creation privileges:
REVOKE CREATE ON SCHEMA <schema_name> FROM <username>;

Caveats:
Dropping the extension with CASCADE removes all dependent database functions, triggers, and objects implemented in PL/Tcl, which can impair application functionality. If package removal or administrative actions require reloading or restarting the PostgreSQL service (systemctl restart postgresql), active client connections will be terminated.

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.