CVE-2025-0218: pgAgent scheduled batch job scripts are created in a predictable temporary directory potentially allowing a denial of service

Published Jan 7, 2025
·
Updated

When batch jobs are executed by pgAgent, a script is created in a temporary directory and then executed. In versions of pgAgent prior to 4.2.3, an insufficiently seeded random number generator is used when generating the directory name, leading to the possibility for a local attacker to pre-create the directory and thus prevent pgAgent from executing jobs, disrupting scheduled tasks.

Affected Software

12 affected componentsFixes available
pgAdmin pgAgent<4.2.3
pgAdmin Pgagent Postgresql<4.2.3
debian/pgagent*
debian/pgagent<4.2.3-1
4.2.3-1
debian/pgagent<4.2.3-1
4.2.3-1
debian/pgagent<=4.2.2-2
4.0.0-8+deb11u14.2.3-1
ubuntu/pgagent<3.4.1-2ubuntu0.1~esm1
3.4.1-2ubuntu0.1~esm1
ubuntu/pgagent<3.4.1-5ubuntu0.1~esm1
3.4.1-5ubuntu0.1~esm1
ubuntu/pgagent<4.0.0-6ubuntu0.1~esm1
4.0.0-6ubuntu0.1~esm1
ubuntu/pgagent<4.2.1-2ubuntu0.1~esm1
4.2.1-2ubuntu0.1~esm1
ubuntu/pgagent<4.2.2-3ubuntu0.1~esm1
4.2.2-3ubuntu0.1~esm1
ubuntu/pgagent*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/pgagent to a version that resolves this vulnerability.

    Fixed in 4.2.3-1
  2. Upgrade

    Upgrade debian/pgagent to a version that resolves this vulnerability.

    Fixed in 4.0.0-8+deb11u1Fixed in 4.2.3-1
  3. Upgrade

    Upgrade ubuntu/pgagent to a version that resolves this vulnerability.

    Fixed in 3.4.1-2ubuntu0.1~esm1
  4. Upgrade

    Upgrade ubuntu/pgagent to a version that resolves this vulnerability.

    Fixed in 3.4.1-5ubuntu0.1~esm1
  5. Upgrade

    Upgrade ubuntu/pgagent to a version that resolves this vulnerability.

    Fixed in 4.0.0-6ubuntu0.1~esm1
  6. Upgrade

    Upgrade ubuntu/pgagent to a version that resolves this vulnerability.

    Fixed in 4.2.1-2ubuntu0.1~esm1
  7. Upgrade

    Upgrade ubuntu/pgagent to a version that resolves this vulnerability.

    Fixed in 4.2.2-3ubuntu0.1~esm1
  8. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 4.2.3

Event History

Jan 7, 2025
CVE Published
via MITRE·07:18 PM
Data Sourced
via MITRE·07:18 PM
DescriptionSeverityWeakness
Data Sourced
via OSV·08:15 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·08:15 PM
DescriptionSeverityWeakness
Feb 11, 2025
Data Sourced
via NVD·09:11 PM
RemedyAffected Software
Updated
via NVD·09:11 PM
SeverityWeakness
Event
via NVD·09:11 PM
Nov 3, 2025
Updated
via NVD·06:15 PM
Affected Software
Dec 2, 2026
Updated
via OSV·02:19 AM
Affected Software
Updated
via OSV·03:17 PM
Affected Software
Dec 3, 2026
Updated
via OSV·08:48 PM
Affected Software

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2025-0218?

CVE-2025-0218 is classified as a medium severity vulnerability.

2

How do I fix CVE-2025-0218?

To fix CVE-2025-0218, upgrade pgAgent to version 4.2.3 or later.

3

What version of pgAgent is affected by CVE-2025-0218?

pgAgent versions prior to 4.2.3 are affected by CVE-2025-0218.

4

What type of attack does CVE-2025-0218 enable?

CVE-2025-0218 enables a local attacker to potentially exploit insufficient randomness in directory naming.

5

Is there a workaround for CVE-2025-0218?

The primary mitigation for CVE-2025-0218 is to update to the patched version, as no effective workaround is documented.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203