CVE-2024-10979PostgreSQL PL/Perl environment variable changes execute arbitrary code
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.
What to do
Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 25.10 | postgresql-17 | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | postgresql-16 | Fixed | 16.6-0ubuntu0.24.04.1 | UBUNTU-CVE-2024-10979 |
| Ubuntu 22.04 | postgresql-14 | Fixed | 14.15-0ubuntu0.22.04.1 | UBUNTU-CVE-2024-10979 |
| Ubuntu 20.04 | postgresql-12 | Fixed | 12.22-0ubuntu0.20.04.1 | UBUNTU-CVE-2024-10979 |
| Ubuntu 18.04 | postgresql-10 | Fix pending | UBUNTU-CVE-2024-10979 | |
| Ubuntu 16.04 | postgresql-9.5 | Fix pending | 9.5.25-0ubuntu0.16.04.1+esm10 (Ubuntu Pro) | UBUNTU-CVE-2024-10979 |
| Ubuntu 14.04 | postgresql-9.3 | Fix pending | UBUNTU-CVE-2024-10979 | |
| Debian 13 | postgresql-17 | Fixed | 17.1-1 | DEBIAN-CVE-2024-10979 |
| Debian 12 | postgresql-15 | Fixed | 15.9-0+deb12u1 | DEBIAN-CVE-2024-10979 |
| Red Hat Enterprise Linux 9 | pg_repack | Fixed | 0:1.5.1-1.module+el9.5.0+22557+8cb08ba5 | RHSA-2024:10787 |
| Red Hat Enterprise Linux 9 | pgaudit | Fixed | 0:16.0-1.module+el9.4.0+20427+07482b8c | RHSA-2024:10787 |
| Red Hat Enterprise Linux 9 | pgvector | Fixed | 0:0.6.2-1.module+el9.5.0+21770+ad2986ef | RHSA-2024:10788 |
| Red Hat Enterprise Linux 9 | postgres-decoderbufs | Fixed | 0:1.9.7-1.Final.module+el9.2.0+17405+aeb9ec60 | RHSA-2024:10788 |
| Red Hat Enterprise Linux 9 | postgresql | Fixed | 0:13.18-1.el9_5 | RHSA-2024:10788 |
| Red Hat Enterprise Linux 9 | postgresql-contrib | Fixed | 0:15.10-1.module+el9.5.0+22558+abb1a50b | RHSA-2024:10791 |
| Red Hat Enterprise Linux 9 | postgresql-docs | Fixed | 0:13.18-1.el9_5 | RHSA-2024:10788 |
| Red Hat Enterprise Linux 9 | postgresql-plperl | Fixed | 0:16.6-1.module+el9.5.0+22557+8cb08ba5 | RHSA-2024:10791 |
| Red Hat Enterprise Linux 9 | postgresql-plpython3 | Fixed | 0:13.18-1.el9_5 | RHSA-2024:10788 |
| Red Hat Enterprise Linux 9 | postgresql-pltcl | Fixed | 0:16.6-1.module+el9.5.0+22557+8cb08ba5 | RHSA-2024:10791 |
| Red Hat Enterprise Linux 9 | postgresql-private-devel | Fixed | 0:15.10-1.module+el9.5.0+22558+abb1a50b | RHSA-2024:10788 |
| Red Hat Enterprise Linux 9 | postgresql-private-libs | Fixed | 0:16.6-1.module+el9.5.0+22557+8cb08ba5 | RHSA-2024:10791 |
| Red Hat Enterprise Linux 9 | postgresql-server | Fixed | 0:13.18-1.el9_5 | RHSA-2024:10787 |
| Red Hat Enterprise Linux 9 | postgresql-server-devel | Fixed | 0:16.6-1.module+el9.5.0+22557+8cb08ba5 | RHSA-2024:10791 |
| Red Hat Enterprise Linux 9 | postgresql-static | Fixed | 0:15.10-1.module+el9.5.0+22558+abb1a50b | RHSA-2024:10791 |
| Red Hat Enterprise Linux 9 | postgresql-test | Fixed | 0:15.10-1.module+el9.5.0+22558+abb1a50b | RHSA-2024:10791 |
| Red Hat Enterprise Linux 9 | postgresql-test-rpm-macros | Fixed | 0:15.10-1.module+el9.5.0+22558+abb1a50b | RHSA-2024:10788 |
| Red Hat Enterprise Linux 9 | postgresql-upgrade | Fixed | 0:16.6-1.module+el9.5.0+22557+8cb08ba5 | RHSA-2024:10791 |
| Red Hat Enterprise Linux 9 | postgresql-upgrade-devel | Fixed | 0:13.18-1.el9_5 | RHSA-2024:10787 |
| Red Hat Enterprise Linux 8 | pg_repack | Fixed | 0:1.4.6-3.module+el8.9.0+19330+c97ddbdf | RHSA-2024:10830 |
| Red Hat Enterprise Linux 8 | pgaudit | Fixed | 0:16.0-1.module+el8.10.0+20413+d8116364 | RHSA-2024:10830 |
| Red Hat Enterprise Linux 8 | postgres-decoderbufs | Fixed | 0:1.9.7-1.Final.module+el8.9.0+19797+c4ce5969 | RHSA-2024:10785 |
| Red Hat Enterprise Linux 8 | postgresql | Fixed | 0:16.6-1.module+el8.10.0+22551+c0330dc9 | RHSA-2024:10832 |
| Red Hat Enterprise Linux 8 | postgresql-contrib | Fixed | 0:13.18-1.module+el8.10.0+22549+cf2ec3d9 | RHSA-2024:10831 |
| Red Hat Enterprise Linux 8 | postgresql-docs | Fixed | 0:13.18-1.module+el8.10.0+22549+cf2ec3d9 | RHSA-2024:10831 |
| Red Hat Enterprise Linux 8 | postgresql-plperl | Fixed | 0:16.6-1.module+el8.10.0+22551+c0330dc9 | RHSA-2024:10785 |
| Red Hat Enterprise Linux 8 | postgresql-plpython3 | Fixed | 0:16.6-1.module+el8.10.0+22551+c0330dc9 | RHSA-2024:10832 |
| Red Hat Enterprise Linux 8 | postgresql-pltcl | Fixed | 0:12.22-1.module+el8.10.0+22548+dd326681 | RHSA-2024:10832 |
| Red Hat Enterprise Linux 8 | postgresql-private-devel | Fixed | 0:16.6-1.module+el8.10.0+22551+c0330dc9 | RHSA-2024:10830 |
| Red Hat Enterprise Linux 8 | postgresql-private-libs | Fixed | 0:15.10-1.module+el8.10.0+22550+22c7d5ca | RHSA-2024:10831 |
| Red Hat Enterprise Linux 8 | postgresql-server | Fixed | 0:15.10-1.module+el8.10.0+22550+22c7d5ca | RHSA-2024:10785 |
| Red Hat Enterprise Linux 8 | postgresql-server-devel | Fixed | 0:12.22-1.module+el8.10.0+22548+dd326681 | RHSA-2024:10832 |
| Red Hat Enterprise Linux 8 | postgresql-static | Fixed | 0:15.10-1.module+el8.10.0+22550+22c7d5ca | RHSA-2024:10831 |
| Red Hat Enterprise Linux 8 | postgresql-test | Fixed | 0:15.10-1.module+el8.10.0+22550+22c7d5ca | RHSA-2024:10831 |
| Red Hat Enterprise Linux 8 | postgresql-test-rpm-macros | Fixed | 0:15.10-1.module+el8.10.0+22550+22c7d5ca | RHSA-2024:10832 |
| Red Hat Enterprise Linux 8 | postgresql-upgrade | Fixed | 0:12.22-1.module+el8.10.0+22548+dd326681 | RHSA-2024:10830 |
| Red Hat Enterprise Linux 8 | postgresql-upgrade-devel | Fixed | 0:16.6-1.module+el8.10.0+22551+c0330dc9 | RHSA-2024:10832 |
| Red Hat Enterprise Linux 6 | postgresql | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-contrib | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-docs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-libs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-plperl | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-plpython | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-pltcl | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-server | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | postgresql-test | Will not fix Out of support scope | ||
| AlmaLinux 9 | pg_repack | Fixed | 1.4.8-2.module_el9.5.0+120+4533eb20 | ALSA-2024:10788 |
| AlmaLinux 9 | pgaudit | Fixed | 16.0-1.module_el9.4.0+66+eb9878bc | ALSA-2024:10787 |
| AlmaLinux 9 | pgvector | Fixed | 0.6.2-1.module_el9.5.0+120+4533eb20 | ALSA-2024:10788 |
| AlmaLinux 9 | postgres-decoderbufs | Fixed | 1.9.7-1.Final.module_el9.3.0+52+21733919 | ALSA-2024:10788 |
| AlmaLinux 9 | postgresql | Fixed | 13.18-1.el9_5 | ALSA-2024:10788 |
| AlmaLinux 9 | postgresql-contrib | Fixed | 16.6-1.module_el9.5.0+127+50ff03a9 | ALSA-2024:10788 |
| AlmaLinux 9 | postgresql-docs | Fixed | 13.18-1.el9_5 | ALSA-2024:10787 |
| AlmaLinux 9 | postgresql-plperl | Fixed | 13.18-1.el9_5 | ALSA-2024:10788 |
| AlmaLinux 9 | postgresql-plpython3 | Fixed | 16.6-1.module_el9.5.0+128+1095dce2 | ALSA-2024:10788 |
| AlmaLinux 9 | postgresql-pltcl | Fixed | 13.18-1.el9_5 | ALSA-2024:10787 |
| AlmaLinux 9 | postgresql-private-devel | Fixed | 16.6-1.module_el9.5.0+127+50ff03a9 | ALSA-2024:10788 |
| AlmaLinux 9 | postgresql-private-libs | Fixed | 13.18-1.el9_5 | ALSA-2024:10787 |
| AlmaLinux 9 | postgresql-server | Fixed | 13.18-1.el9_5 | ALSA-2024:10788 |
| AlmaLinux 9 | postgresql-server-devel | Fixed | 16.6-1.module_el9.5.0+127+50ff03a9 | ALSA-2024:10791 |
| AlmaLinux 9 | postgresql-static | Fixed | 15.10-1.module_el9.5.0+126+03d48c9f | ALSA-2024:10788 |
| AlmaLinux 9 | postgresql-test | Fixed | 16.6-1.module_el9.5.0+128+1095dce2 | ALSA-2024:10788 |
| AlmaLinux 9 | postgresql-test-rpm-macros | Fixed | 16.6-1.module_el9.5.0+127+50ff03a9 | ALSA-2024:10791 |
| AlmaLinux 9 | postgresql-upgrade | Fixed | 13.18-1.el9_5 | ALSA-2024:10787 |
| AlmaLinux 9 | postgresql-upgrade-devel | Fixed | 13.18-1.el9_5 | ALSA-2024:10788 |
| AlmaLinux 8 | pg_repack | Fixed | 1.4.6-3.module_el8.6.0+2760+1746ec94 | ALSA-2024:10832 |
| AlmaLinux 8 | pgaudit | Fixed | 16.0-1.module_el8.10.0+3798+606ebb9f | ALSA-2024:10832 |
| AlmaLinux 8 | postgres-decoderbufs | Fixed | 0.10.0-2.module_el8.9.0+3704+f1f917ce | ALSA-2024:10785 |
| AlmaLinux 8 | postgresql | Fixed | 16.6-1.module_el8.10.0+3930+ecf33554 | ALSA-2024:10830 |
| AlmaLinux 8 | postgresql-contrib | Fixed | 16.6-1.module_el8.10.0+3930+ecf33554 | ALSA-2024:10832 |
| AlmaLinux 8 | postgresql-docs | Fixed | 13.18-1.module_el8.10.0+3928+8233d274 | ALSA-2024:10831 |
| AlmaLinux 8 | postgresql-plperl | Fixed | 15.10-1.module_el8.10.0+3929+38258aa5 | ALSA-2024:10785 |
| AlmaLinux 8 | postgresql-plpython3 | Fixed | 15.10-1.module_el8.10.0+3929+38258aa5 | ALSA-2024:10831 |
| AlmaLinux 8 | postgresql-pltcl | Fixed | 15.10-1.module_el8.10.0+3929+38258aa5 | ALSA-2024:10832 |
| AlmaLinux 8 | postgresql-private-devel | Fixed | 16.6-1.module_el8.10.0+3930+ecf33554 | ALSA-2024:10830 |
| AlmaLinux 8 | postgresql-private-libs | Fixed | 15.10-1.module_el8.10.0+3929+38258aa5 | ALSA-2024:10831 |
| AlmaLinux 8 | postgresql-server | Fixed | 16.6-1.module_el8.10.0+3930+ecf33554 | ALSA-2024:10830 |
| AlmaLinux 8 | postgresql-server-devel | Fixed | 15.10-1.module_el8.10.0+3929+38258aa5 | ALSA-2024:10832 |
| AlmaLinux 8 | postgresql-static | Fixed | 12.22-1.module_el8.10.0+3927+7f0fab70 | ALSA-2024:10832 |
| AlmaLinux 8 | postgresql-test | Fixed | 12.22-1.module_el8.10.0+3927+7f0fab70 | ALSA-2024:10830 |
| AlmaLinux 8 | postgresql-test-rpm-macros | Fixed | 13.18-1.module_el8.10.0+3928+8233d274 | ALSA-2024:10831 |
| AlmaLinux 8 | postgresql-upgrade | Fixed | 13.18-1.module_el8.10.0+3928+8233d274 | ALSA-2024:10830 |
| AlmaLinux 8 | postgresql-upgrade-devel | Fixed | 13.18-1.module_el8.10.0+3928+8233d274 | ALSA-2024:10830 |
| Rocky Linux 9 | pg_repack | Fixed | 0:1.5.1-1.module+el9.5.0+30638+72f697e1 | RLSA-2024:10787 |
| Rocky Linux 9 | pgaudit | Fixed | 0:16.0-1.module+el9.5.0+30638+72f697e1 | RLSA-2024:10787 |
| Rocky Linux 9 | pgvector | Fixed | 0:0.6.2-1.module+el9.5.0+30638+72f697e1 | RLSA-2024:10788 |
| Rocky Linux 9 | postgres-decoderbufs | Fixed | 0:1.9.7-1.Final.module+el9.5.0+30637+4391fcca | RLSA-2024:10788 |
| Rocky Linux 8 | pg_repack | Fixed | 0:1.4.6-3.module+el8.10.0+1862+29bef648 | RLSA-2024:10785 |
| Rocky Linux 8 | pgaudit | Fixed | 0:1.4.0-7.module+el8.9.0+1735+a332307b | RLSA-2024:10831 |
| Rocky Linux 8 | postgres-decoderbufs | Fixed | 0:0.10.0-2.module+el8.10.0+1862+29bef648 | RLSA-2024:10830 |
| Rocky Linux 8 | postgresql | Fixed | 0:13.18-1.module+el8.10.0+1898+8409d9ae | RLSA-2024:10830 |
| Alpine Linux 3.24 | postgresql16 | Fixed | 16.5-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.24 | postgresql17 | Fixed | 17.1-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.23 | postgresql16 | Fixed | 16.5-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.23 | postgresql17 | Fixed | 17.1-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.22 | postgresql15 | Fixed | 15.9-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.22 | postgresql16 | Fixed | 16.5-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.22 | postgresql17 | Fixed | 17.1-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.21 | postgresql15 | Fixed | 15.9-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.21 | postgresql16 | Fixed | 16.5-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.21 | postgresql17 | Fixed | 17.1-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.20 | postgresql14 | Fixed | 14.14-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.20 | postgresql15 | Fixed | 15.9-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.20 | postgresql16 | Fixed | 16.5-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.19 | postgresql13 | Fixed | 13.17-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.19 | postgresql14 | Fixed | 14.14-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.19 | postgresql15 | Fixed | 15.9-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.19 | postgresql16 | Fixed | 16.5-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.18 | postgresql13 | Fixed | 13.17-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.18 | postgresql14 | Fixed | 14.14-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.18 | postgresql15 | Fixed | 15.9-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.17 | postgresql13 | Fixed | 13.17-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.17 | postgresql14 | Fixed | 14.14-r0 | ALPINE-CVE-2024-10979 |
| Alpine Linux 3.17 | postgresql15 | Fixed | 15.9-r0 | ALPINE-CVE-2024-10979 |
What the vendor says
As published in the CVE record by PostgreSQL, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- PostgreSQL: 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
References
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.