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

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

- **Severity:** High 8.8 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 Nov 2024
- **Updated:** 3 Nov 2025
- **Also known as:** ALPINE-CVE-2024-10979, AZL-53198, AZL-53212, BELL-CVE-2024-10979, BIT-postgresql-2024-10979, CLEANSTART-2026-MY37775, CLSA-2024-1734372021, CLSA-2025-1743011981, CLSA-2025-1747849358, DEBIAN-CVE-2024-10979, ECHO-a285-f305-ca67, GHSA-2r9h-x757-8j9q, JLSEC-2026-50, MINI-85xw-qcmq-j9rh, MINI-cxpm-cwp3-m6w2, MINI-x674-c4fr-r575, RHSA-2024:10593, RHSA-2024:10595, RHSA-2024:10677, RHSA-2024:10705, RHSA-2024:10736, RHSA-2024:10739, RHSA-2024:10750, RHSA-2024:10789, RHSA-2024:10800, RHSA-2024:10807, RHSA-2024:10827, RHSA-2024:10846, RHSA-2024:10851, RHSA-2024:10879, RHSA-2024:10882, UBUNTU-CVE-2024-10979

## 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 (Externally Controlled Reference to a Resource in Another Sphere), CWE-15 (External Control of System or Configuration Setting)

## Which versions are affected by CVE-2024-10979?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `postgresql` | Bitnami | All versions | 13.17.0, 14.14.0, 15.9.0, 16.5.0, 17.1.0 |
| `pgaudit` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:1.4.0-4.module+el8.2.0+9043+1dbb5661 |
| `pgaudit-debuginfo` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:1.4.0-4.module+el8.2.0+9043+1dbb5661 |
| `pgaudit-debugsource` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:1.4.0-4.module+el8.2.0+9043+1dbb5661 |
| `postgres-decoderbufs` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:0.10.0-2.module+el8.2.0+9043+1dbb5661 |
| `postgres-decoderbufs-debuginfo` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:0.10.0-2.module+el8.2.0+9043+1dbb5661 |
| `postgres-decoderbufs-debugsource` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:0.10.0-2.module+el8.2.0+9043+1dbb5661 |
| `postgresql` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-contrib` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-contrib-debuginfo` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-debuginfo` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-debugsource` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-docs` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-docs-debuginfo` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-plperl` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-plperl-debuginfo` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-plpython3` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-plpython3-debuginfo` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-pltcl` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-pltcl-debuginfo` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-server` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-server-debuginfo` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-server-devel` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-server-devel-debuginfo` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-static` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-test` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-test-debuginfo` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-test-rpm-macros` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-upgrade` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-upgrade-debuginfo` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-upgrade-devel` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `postgresql-upgrade-devel-debuginfo` | Red Hat:rhel_aus:8.2::appstream | All versions | 0:12.22-1.module+el8.2.0+22565+6ef52370 |
| `pgaudit` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:1.4.0-6.module+el8.4.0+11288+c193d6d7 |
| `pgaudit` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:1.5.0-1.module+el8.4.0+8873+b821c30a |
| `pgaudit-debuginfo` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:1.4.0-6.module+el8.4.0+11288+c193d6d7 |
| `pgaudit-debuginfo` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:1.5.0-1.module+el8.4.0+8873+b821c30a |
| `pgaudit-debugsource` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:1.4.0-6.module+el8.4.0+11288+c193d6d7 |
| `pgaudit-debugsource` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:1.5.0-1.module+el8.4.0+8873+b821c30a |
| `postgres-decoderbufs` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:0.10.0-2.module+el8.4.0+11288+c193d6d7 |
| `postgres-decoderbufs` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:0.10.0-2.module+el8.4.0+8873+b821c30a |

Products: 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.

## Is CVE-2024-10979 being exploited?

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

## Other vulnerabilities in Postgresql Postgresql

- [CVE-2013-1902](https://insights.sbomify.com/CVE-2013-1902/): Information disclosure in n/a (critical 10.0)
- [CVE-2013-1903](https://insights.sbomify.com/CVE-2013-1903/): Information disclosure in n/a (critical 10.0)
- [CVE-2007-3279](https://insights.sbomify.com/CVE-2007-3279/): Privilege escalation in n/a (critical 10.0)
- [CVE-2002-1399](https://insights.sbomify.com/CVE-2002-1399/): Integer overflow in n/a (critical 10.0)
- [CVE-2016-3065](https://insights.sbomify.com/CVE-2016-3065/): Information disclosure in n/a (critical 9.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-10979 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2024-10979 in the wild and no public exploit code.

Affected packages and fixed versions:
- postgresql (Bitnami): affected all versions; fixed in 13.17.0, 14.14.0, 15.9.0, 16.5.0, 17.1.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-10979/ (Markdown: https://insights.sbomify.com/CVE-2024-10979/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-10979
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-10979
- OSV: https://osv.dev/vulnerability/CVE-2024-10979

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-10979/
Summaries are generated and may contain mistakes; the official description above is the record.
