PortGate

Advisories · Databases

CVE-2024-10979 High CVSS 8.8

PostgreSQL PL/Perl environment leak

Disclosed 2024 · Last reviewed 2 Dec 2026

A PL/Perl function could change environment variables that a later process in the same backend would see.

What happened

The language handler did not restore the environment after the function returned.

Affected and patched versions

Affected
PostgreSQL before 17.1, 16.5, 15.9, 14.14, and 13.17 when an untrusted user can create a PL/Perl function.
Patched
Those minor releases. Apply the minor that matches the major you run.

How to check your server

Check

psql -c "SHOW server_version"

How to fix and harden

  1. Read server_version.
  2. Install the minor update for that major. PostgreSQL 17.1 is the wrong package for a 16.x cluster.
  3. Do not let ordinary application roles create untrusted procedural languages.

Fix

psql -c "SHOW server_version"

Sources

Version ranges and fixes follow the vendor advisory. When a distribution backports a fix, trust its security tracker over the upstream version number. New advisories: RSS · JSON