CVE-2025-0218: pgAgent scheduled batch job scripts are created in a predictable temporary directory potentially allowing a denial of service
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
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/pgagentto a version that resolves this vulnerability.Fixed in 4.2.3-1 - Upgrade
Upgrade
debian/pgagentto a version that resolves this vulnerability.Fixed in 4.0.0-8+deb11u1Fixed in 4.2.3-1 - Upgrade
Upgrade
ubuntu/pgagentto a version that resolves this vulnerability.Fixed in 3.4.1-2ubuntu0.1~esm1 - Upgrade
Upgrade
ubuntu/pgagentto a version that resolves this vulnerability.Fixed in 3.4.1-5ubuntu0.1~esm1 - Upgrade
Upgrade
ubuntu/pgagentto a version that resolves this vulnerability.Fixed in 4.0.0-6ubuntu0.1~esm1 - Upgrade
Upgrade
ubuntu/pgagentto a version that resolves this vulnerability.Fixed in 4.2.1-2ubuntu0.1~esm1 - Upgrade
Upgrade
ubuntu/pgagentto a version that resolves this vulnerability.Fixed in 4.2.2-3ubuntu0.1~esm1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 4.2.3
Event History
Frequently Asked Questions
What is the severity of CVE-2025-0218?
CVE-2025-0218 is classified as a medium severity vulnerability.
How do I fix CVE-2025-0218?
To fix CVE-2025-0218, upgrade pgAgent to version 4.2.3 or later.
What version of pgAgent is affected by CVE-2025-0218?
pgAgent versions prior to 4.2.3 are affected by CVE-2025-0218.
What type of attack does CVE-2025-0218 enable?
CVE-2025-0218 enables a local attacker to potentially exploit insufficient randomness in directory naming.
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.