Read the docs
TI-2024-10177 Aliases CVE-2024-10979GHSA-2r9h-x757-8j9q

PostgreSQL PL/Perl environment variable changes execute arbitrary code

Priority MEDIUM 47CWE-15Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
High · High · High
Fix status
Partial Red Hat: 18 fixed, 1 without a fix

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat.

Summary

Incorrect control of environment variables in PostgreSQL PL/Perl allows an unprivileged database user to change sensitive process environment variables (e.g. PATH). That often suffices to enable arbitrary code execution, even if the attacker lacks a database server operating system user. Versions before PostgreSQL 17.1, 16.5, 15.9, 14.14, 13.17, and 12.21 are affected.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.04393 91st percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Partial PostgreSQL: 17.1, 16.5, 15.9 +3Red Hat: 22 advisoriesRed Hat: 18 fixed, 1 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
—PostgreSQL17 to before 17.1; 16 to before 16.5; 15 to before 15.9; 14 to before 14.14; 13 to before 13.17; before 12.2117.1, 16.5, 15.9, 14.14, 13.17, 12.21Patch availableCNA
  • PostgreSQL Vendor— Affected 17 to before 17.1; 16 to before 16.5; 15 to before 15.9; 14 to before 14.14; 13 to before 13.17; before 12.21 Fixed in 17.1, 16.5, 15.9, 14.14, 13.17, 12.21 Patch available CNA

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*12.0 to before 12.21; 13.0 to before 13.17; 14.0 to before 14.14; 15.0 to before 15.9; 16.0 to before 16.5; 17.0 to before 17.1VulnerablePostgreSQL
  • cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:* Versions 12.0 to before 12.21; 13.0 to before 13.17; 14.0 to before 14.14; 15.0 to before 15.9; 16.0 to before 16.5; 17.0 to before 17.1 Vulnerable ·PostgreSQL

Remediation

  • Fix · CNA PostgreSQL Fixed in 17.1, 16.5, 15.9, 14.14, 13.17, 12.21

Red Hat 22 advisories

  • RHSA-2024:10882 Released 2024-12-09 · Red Hat rating Important
    postgresql security update
    • Red Hat Enterprise Linux Server (v. 7 ELS) postgresql-9.2.24-9.el7_9.2, postgresql-9.2.24-9.el7_9.2.ppc, postgresql-contrib-9.2.24-9.el7_9.2 +10
    • Red Hat Enterprise Linux Server Optional (v. 7 ELS) postgresql-static-9.2.24-9.el7_9.2, postgresql-static-9.2.24-9.el7_9.2.ppc, postgresql-upgrade-9.2.24-9.el7_9.2
  • RHSA-2024:10879 Released 2024-12-09 · Red Hat rating Important
    postgresql:13 security update
    • Red Hat CodeReady Linux Builder EUS (v.9.2) postgresql-docs-13.18-1.el9_2, postgresql-private-devel-13.18-1.el9_2, postgresql-server-devel-13.18-1.el9_2 +3
    • Red Hat Enterprise Linux AppStream EUS (v.9.2) postgresql-13.18-1.el9_2, postgresql-contrib-13.18-1.el9_2, postgresql-plperl-13.18-1.el9_2 +5
  • RHSA-2024:10851 Released 2024-12-05 · Red Hat rating Important
    postgresql:15 security update
    • Red Hat Enterprise Linux AppStream EUS (v.8.8) pg_repack-1.4.8-1.module+el8.8.0+17071+aaaceaa4.aarch64::postgresql:15, pg_repack-1.4.8-1.module+el8.8.0+17071+aaaceaa4.ppc64le::postgresql:15, pg_repack-1.4.8-1.module+el8.8.0+17071+aaaceaa4.s390x::postgresql:15 +47
Show 19 more Red Hat advisories
  • RHSA-2024:10846 Released 2024-12-05 · Red Hat rating Important
    postgresql:13 security update
    • Red Hat Enterprise Linux AppStream AUS (v.8.4) pgaudit-1.5.0-1.module+el8.4.0+8873+b821c30a.src::postgresql:13, pgaudit-1.5.0-1.module+el8.4.0+8873+b821c30a.x86_64::postgresql:13, postgres-decoderbufs-0.10.0-2.module+el8.4.0+8873+b821c30a.src::postgresql:13 +15
    • Red Hat Enterprise Linux AppStream E4S (v.8.4) pgaudit-1.5.0-1.module+el8.4.0+8873+b821c30a.ppc64le::postgresql:13, pgaudit-1.5.0-1.module+el8.4.0+8873+b821c30a.src::postgresql:13, pgaudit-1.5.0-1.module+el8.4.0+8873+b821c30a.x86_64::postgresql:13 +29
    • Red Hat Enterprise Linux AppStream TUS (v.8.4) pgaudit-1.5.0-1.module+el8.4.0+8873+b821c30a.src::postgresql:13, pgaudit-1.5.0-1.module+el8.4.0+8873+b821c30a.x86_64::postgresql:13, postgres-decoderbufs-0.10.0-2.module+el8.4.0+8873+b821c30a.src::postgresql:13 +15
  • RHSA-2024:10831 Released 2024-12-05 · Red Hat rating Important
    postgresql:16 security update
    • Red Hat Enterprise Linux AppStream (v. 8) pg_repack-1.5.1-1.module+el8.10.0+22551+c0330dc9.aarch64::postgresql:16, pg_repack-1.5.1-1.module+el8.10.0+22551+c0330dc9.ppc64le::postgresql:16, pg_repack-1.5.1-1.module+el8.10.0+22551+c0330dc9.s390x::postgresql:16 +47
  • RHSA-2024:10832 Released 2024-12-05 · Red Hat rating Important
    postgresql:13 security update
    • Red Hat Enterprise Linux AppStream (v. 8) pg_repack-1.4.6-3.module+el8.9.0+20664+9c30cf7f.aarch64::postgresql:13, pg_repack-1.4.6-3.module+el8.9.0+20664+9c30cf7f.ppc64le::postgresql:13, pg_repack-1.4.6-3.module+el8.9.0+20664+9c30cf7f.s390x::postgresql:13 +47
  • RHSA-2024:10830 Released 2024-12-05 · Red Hat rating Important
    postgresql:15 security update
    • Red Hat Enterprise Linux AppStream (v. 8) pg_repack-1.4.8-1.module+el8.9.0+19797+c4ce5969.aarch64::postgresql:15, pg_repack-1.4.8-1.module+el8.9.0+19797+c4ce5969.ppc64le::postgresql:15, pg_repack-1.4.8-1.module+el8.9.0+19797+c4ce5969.s390x::postgresql:15 +47
  • RHSA-2024:10827 Released 2024-12-05 · Red Hat rating Important
    postgresql security update
    • Red Hat Enterprise Linux AppStream E4S (v.9.0) postgresql-13.18-1.el9_0, postgresql-contrib-13.18-1.el9_0, postgresql-plperl-13.18-1.el9_0 +5
  • RHSA-2024:10807 Released 2024-12-04 · Red Hat rating Important
    postgresql:15 security update
    • Red Hat Enterprise Linux AppStream EUS (v.9.2) pg_repack-1.4.8-1.module+el9.2.0+17405+aeb9ec60.aarch64::postgresql:15, pg_repack-1.4.8-1.module+el9.2.0+17405+aeb9ec60.ppc64le::postgresql:15, pg_repack-1.4.8-1.module+el9.2.0+17405+aeb9ec60.s390x::postgresql:15 +47
  • RHSA-2024:10800 Released 2024-12-04 · Red Hat rating Important
    postgresql:13 security update
    • Red Hat Enterprise Linux AppStream EUS (v.8.8) pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.aarch64::postgresql:13, pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.ppc64le::postgresql:13, pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.s390x::postgresql:13 +47
  • RHSA-2024:10791 Released 2024-12-04 · Red Hat rating Important
    postgresql security update
    • Red Hat CodeReady Linux Builder (v. 9) postgresql-docs-13.18-1.el9_5, postgresql-private-devel-13.18-1.el9_5, postgresql-server-devel-13.18-1.el9_5 +4
    • Red Hat Enterprise Linux AppStream (v. 9) postgresql-13.18-1.el9_5, postgresql-contrib-13.18-1.el9_5, postgresql-plperl-13.18-1.el9_5 +5
  • RHSA-2024:10789 Released 2024-12-04 · Red Hat rating Important
    postgresql:12 security update
    • Red Hat Enterprise Linux AppStream AUS (v.8.4) pgaudit-1.4.0-6.module+el8.4.0+11288+c193d6d7.src::postgresql:12, pgaudit-1.4.0-6.module+el8.4.0+11288+c193d6d7.x86_64::postgresql:12, postgres-decoderbufs-0.10.0-2.module+el8.4.0+11288+c193d6d7.src::postgresql:12 +15
    • Red Hat Enterprise Linux AppStream E4S (v.8.4) pgaudit-1.4.0-6.module+el8.4.0+11288+c193d6d7.ppc64le::postgresql:12, pgaudit-1.4.0-6.module+el8.4.0+11288+c193d6d7.src::postgresql:12, pgaudit-1.4.0-6.module+el8.4.0+11288+c193d6d7.x86_64::postgresql:12 +29
    • Red Hat Enterprise Linux AppStream TUS (v.8.4) pgaudit-1.4.0-6.module+el8.4.0+11288+c193d6d7.src::postgresql:12, pgaudit-1.4.0-6.module+el8.4.0+11288+c193d6d7.x86_64::postgresql:12, postgres-decoderbufs-0.10.0-2.module+el8.4.0+11288+c193d6d7.src::postgresql:12 +15
  • RHSA-2024:10788 Released 2024-12-04 · Red Hat rating Important
    postgresql:16 security update
    • Red Hat Enterprise Linux AppStream (v. 9) pg_repack-1.5.1-1.module+el9.5.0+22557+8cb08ba5.aarch64::postgresql:16, pg_repack-1.5.1-1.module+el9.5.0+22557+8cb08ba5.ppc64le::postgresql:16, pg_repack-1.5.1-1.module+el9.5.0+22557+8cb08ba5.s390x::postgresql:16 +47
  • RHSA-2024:10787 Released 2024-12-04 · Red Hat rating Important
    postgresql:15 security update
    • Red Hat Enterprise Linux AppStream (v. 9) pg_repack-1.4.8-2.module+el9.5.0+22224+f5585c78.aarch64::postgresql:15, pg_repack-1.4.8-2.module+el9.5.0+22224+f5585c78.ppc64le::postgresql:15, pg_repack-1.4.8-2.module+el9.5.0+22224+f5585c78.s390x::postgresql:15 +47
  • RHSA-2024:10785 Released 2024-12-04 · Red Hat rating Important
    postgresql:12 security update
    • Red Hat Enterprise Linux AppStream (v. 8) pg_repack-1.4.6-3.module+el8.9.0+19330+c97ddbdf.aarch64::postgresql:12, pg_repack-1.4.6-3.module+el8.9.0+19330+c97ddbdf.ppc64le::postgresql:12, pg_repack-1.4.6-3.module+el8.9.0+19330+c97ddbdf.s390x::postgresql:12 +47
  • RHSA-2024:10750 Released 2024-12-03 · Red Hat rating Important
    postgresql:12 security update
    • Red Hat Enterprise Linux AppStream EUS (v.8.8) pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.aarch64::postgresql:12, pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.ppc64le::postgresql:12, pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.s390x::postgresql:12 +47
  • RHSA-2024:10739 Released 2024-12-03 · Red Hat rating Important
    postgresql:12 security update
    • Red Hat Enterprise Linux AppStream AUS (v. 8.2) pgaudit-1.4.0-4.module+el8.2.0+9043+1dbb5661.src::postgresql:12, pgaudit-1.4.0-4.module+el8.2.0+9043+1dbb5661.x86_64::postgresql:12, postgres-decoderbufs-0.10.0-2.module+el8.2.0+9043+1dbb5661.src::postgresql:12 +15
  • RHSA-2024:10736 Released 2024-12-03 · Red Hat rating Important
    postgresql:15 security update
    • Red Hat Enterprise Linux AppStream EUS (v.9.4) pg_repack-1.4.8-1.module+el9.2.0+17405+aeb9ec60.aarch64::postgresql:15, pg_repack-1.4.8-1.module+el9.2.0+17405+aeb9ec60.ppc64le::postgresql:15, pg_repack-1.4.8-1.module+el9.2.0+17405+aeb9ec60.s390x::postgresql:15 +47
  • RHSA-2024:10705 Released 2024-12-02 · Red Hat rating Important
    postgresql:12 security update
    • Red Hat Enterprise Linux AppStream AUS (v.8.6) pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.src::postgresql:12, pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.x86_64::postgresql:12, pgaudit-1.4.0-5.module+el8.5.0+11354+78b3c9c5.src::postgresql:12 +17
    • Red Hat Enterprise Linux AppStream E4S (v.8.6) pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.aarch64::postgresql:12, pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.ppc64le::postgresql:12, pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.s390x::postgresql:12 +47
    • Red Hat Enterprise Linux AppStream TUS (v.8.6) pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.src::postgresql:12, pg_repack-1.4.6-3.module+el8.5.0+11354+78b3c9c5.x86_64::postgresql:12, pgaudit-1.4.0-5.module+el8.5.0+11354+78b3c9c5.src::postgresql:12 +17
  • RHSA-2024:10677 Released 2024-12-02 · Red Hat rating Important
    postgresql:13 security update
    • Red Hat Enterprise Linux AppStream AUS (v.8.6) pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.src::postgresql:13, pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.x86_64::postgresql:13, pgaudit-1.5.0-1.module+el8.4.0+8873+b821c30a.src::postgresql:13 +17
    • Red Hat Enterprise Linux AppStream E4S (v.8.6) pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.aarch64::postgresql:13, pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.ppc64le::postgresql:13, pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.s390x::postgresql:13 +47
    • Red Hat Enterprise Linux AppStream TUS (v.8.6) pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.src::postgresql:13, pg_repack-1.4.6-3.module+el8.5.0+11357+bcc62552.x86_64::postgresql:13, pgaudit-1.5.0-1.module+el8.4.0+8873+b821c30a.src::postgresql:13 +17
  • RHSA-2024:10593 Released 2024-12-02 · Red Hat rating Important
    postgresql:16 security update
    • Red Hat Enterprise Linux AppStream EUS (v.9.4) pg_repack-1.4.8-1.module+el9.4.0+20427+07482b8c.aarch64::postgresql:16, pg_repack-1.4.8-1.module+el9.4.0+20427+07482b8c.ppc64le::postgresql:16, pg_repack-1.4.8-1.module+el9.4.0+20427+07482b8c.s390x::postgresql:16 +47
  • RHSA-2024:10595 Released 2024-12-02 · Red Hat rating Important
    postgresql security update
    • Red Hat CodeReady Linux Builder EUS (v.9.4) postgresql-docs-13.18-1.el9_4, postgresql-private-devel-13.18-1.el9_4, postgresql-server-devel-13.18-1.el9_4 +3
    • Red Hat Enterprise Linux AppStream EUS (v.9.4) postgresql-13.18-1.el9_4, postgresql-contrib-13.18-1.el9_4, postgresql-plperl-13.18-1.el9_4 +5

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    PostgreSQL 12.21, 13.17 and 4 more versions

    4 records Highest priority Priority MEDIUM 1 MEDIUM, 3 LOW

    Other records, highest priority first

    • TI-2024-10174 PostgreSQL row security below e.g. subqueries disregards user ID changesPriority LOW 26
    • TI-2024-10176 PostgreSQL SET ROLE, SET SESSION AUTHORIZATION reset to wrong user IDPriority LOW 21
    • TI-2024-10175 PostgreSQL libpq retains an error message from man-in-the-middlePriority LOW 18

Vendor assessments

Red Hat

Red Hat rating: Important. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Enterprise Linux 6AffectedNo fix planned: Out of support scope
Red Hat CodeReady Linux Builder (v. 9)Fixed RHSA-2024:10791
Red Hat CodeReady Linux Builder EUS (v.9.2)Fixed RHSA-2024:10879
Red Hat CodeReady Linux Builder EUS (v.9.4)Fixed RHSA-2024:10595
Red Hat Enterprise Linux AppStream (v. 8)Fixed RHSA-2024:10785, RHSA-2024:10830, RHSA-2024:10831, RHSA-2024:10832
Red Hat Enterprise Linux AppStream (v. 9)Fixed RHSA-2024:10787, RHSA-2024:10788, RHSA-2024:10791
Red Hat Enterprise Linux AppStream AUS (v. 8.2)Fixed RHSA-2024:10739
Red Hat Enterprise Linux AppStream AUS (v.8.4)Fixed RHSA-2024:10789, RHSA-2024:10846
Red Hat Enterprise Linux AppStream AUS (v.8.6)Fixed RHSA-2024:10677, RHSA-2024:10705
Red Hat Enterprise Linux AppStream E4S (v.8.4)Fixed RHSA-2024:10789, RHSA-2024:10846
Red Hat Enterprise Linux AppStream E4S (v.8.6)Fixed RHSA-2024:10677, RHSA-2024:10705
Red Hat Enterprise Linux AppStream E4S (v.9.0)Fixed RHSA-2024:10827
Red Hat Enterprise Linux AppStream EUS (v.8.8)Fixed RHSA-2024:10750, RHSA-2024:10800, RHSA-2024:10851
Red Hat Enterprise Linux AppStream EUS (v.9.2)Fixed RHSA-2024:10807, RHSA-2024:10879
Red Hat Enterprise Linux AppStream EUS (v.9.4)Fixed RHSA-2024:10593, RHSA-2024:10595, RHSA-2024:10736
Red Hat Enterprise Linux AppStream TUS (v.8.4)Fixed RHSA-2024:10789, RHSA-2024:10846
Red Hat Enterprise Linux AppStream TUS (v.8.6)Fixed RHSA-2024:10677, RHSA-2024:10705
Red Hat Enterprise Linux Server (v. 7 ELS)Fixed RHSA-2024:10882
Red Hat Enterprise Linux Server Optional (v. 7 ELS)Fixed RHSA-2024:10882

Timeline

  1. 2026-10-02 Threatist record created from CVE-2024-10979
  2. 2026-10-03 Alias added: GHSA-2r9h-x757-8j9q

References

  • TI-2019-06651 In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and… CVSS 3.0HIGH 7.2
  • TI-2017-05187 Improper authentication in postgresql CVSS 3.0CRITICAL 9.8
  • TI-2020-15711 SQL injection in postgresql CVSS 3.1HIGH 8.8
  • TI-2013-01675 Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9… CVSS 2.0MEDIUM 6.5
  • TI-2007-03176 The Database Link library (dblink) in PostgreSQL 8.1 implements functions via CREATE… CVSS 2.0HIGH 9.0
  • TI-2022-01423 SQL injection in postgresql CVSS 3.1HIGH 8.8
See all 202 →

Sources