CVE-2024-10979 PostgreSQL PL/Perl environment variable changes execute arbitrary code

High 8.8 Published Updated

An unprivileged database user can modify environment variables in PL/Perl to execute arbitrary code on the server.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-10979?

CVE-2024-10979 is a high-severity code injection vulnerability in Postgresql Postgresql, published on 14 Nov 2024. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

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.

Weakness: CWE-610, CWE-15

Which versions are affected by CVE-2024-10979?

1 open source package ship an affected version, including postgresql. It affects 1 product.

PackageAffectedFixed in
postgresql BitnamiAll versions13.17.0, 14.14.0, 15.9.0, 16.5.0, 17.1.0
Linux distribution packages (39)
pgaudit Red Hat:rhel_aus:8.2::appstreamAll versions0:1.4.0-4.module+el8.2.0+9043+1dbb5661
pgaudit-debuginfo Red Hat:rhel_aus:8.2::appstreamAll versions0:1.4.0-4.module+el8.2.0+9043+1dbb5661
pgaudit-debugsource Red Hat:rhel_aus:8.2::appstreamAll versions0:1.4.0-4.module+el8.2.0+9043+1dbb5661
postgres-decoderbufs Red Hat:rhel_aus:8.2::appstreamAll versions0:0.10.0-2.module+el8.2.0+9043+1dbb5661
postgres-decoderbufs-debuginfo Red Hat:rhel_aus:8.2::appstreamAll versions0:0.10.0-2.module+el8.2.0+9043+1dbb5661
postgres-decoderbufs-debugsource Red Hat:rhel_aus:8.2::appstreamAll versions0:0.10.0-2.module+el8.2.0+9043+1dbb5661
postgresql Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-contrib Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-contrib-debuginfo Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-debuginfo Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-debugsource Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-docs Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-docs-debuginfo Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-plperl Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-plperl-debuginfo Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-plpython3 Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-plpython3-debuginfo Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-pltcl Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-pltcl-debuginfo Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-server Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-server-debuginfo Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-server-devel Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-server-devel-debuginfo Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-static Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-test Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-test-debuginfo Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-test-rpm-macros Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-upgrade Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-upgrade-debuginfo Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-upgrade-devel Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
postgresql-upgrade-devel-debuginfo Red Hat:rhel_aus:8.2::appstreamAll versions0:12.22-1.module+el8.2.0+22565+6ef52370
pgaudit Red Hat:rhel_aus:8.4::appstreamAll versions0:1.4.0-6.module+el8.4.0+11288+c193d6d7
pgaudit Red Hat:rhel_aus:8.4::appstreamAll versions0:1.5.0-1.module+el8.4.0+8873+b821c30a
pgaudit-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:1.4.0-6.module+el8.4.0+11288+c193d6d7
pgaudit-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions0:1.5.0-1.module+el8.4.0+8873+b821c30a
pgaudit-debugsource Red Hat:rhel_aus:8.4::appstreamAll versions0:1.4.0-6.module+el8.4.0+11288+c193d6d7
pgaudit-debugsource Red Hat:rhel_aus:8.4::appstreamAll versions0:1.5.0-1.module+el8.4.0+8873+b821c30a
postgres-decoderbufs Red Hat:rhel_aus:8.4::appstreamAll versions0:0.10.0-2.module+el8.4.0+11288+c193d6d7
postgres-decoderbufs Red Hat:rhel_aus:8.4::appstreamAll versions0:0.10.0-2.module+el8.4.0+8873+b821c30a

Products include Postgresql Postgresql.

How do I fix CVE-2024-10979?

Upgrade postgresql to a fixed version for your release line: 13.17.0, 14.14.0, 15.9.0 or 16.5.0.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2024-10979 being exploited?

There is no known exploitation of CVE-2024-10979 in the wild and no public exploit code.

All Postgresql Postgresql vulnerabilities

Sources

Also known as ALPINE-CVE-2024-10979, AZL-53198, AZL-53212, BELL-CVE-2024-10979, BIT-postgresql-2024-10979, CLEANSTART-2026-MY37775 and 26 more.

Is CVE-2024-10979 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free