Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-0218: Generation of Predictable Numbers or Identifiers in pgAgent

0
Medium
VulnerabilityCVE-2025-0218cvecve-2025-0218
Published: Tue Jan 07 2025 (01/07/2025, 19:18:02 UTC)
Source: CVE Database V5
Product: pgAgent

Description

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.

AI-Powered Analysis

AILast updated: 11/03/2025, 18:02:34 UTC

Technical Analysis

CVE-2025-0218 is a vulnerability in pgAgent, a job scheduling agent for PostgreSQL, affecting versions prior to 4.2.3. The issue arises from the use of an insufficiently seeded random number generator when creating temporary directories for batch job scripts. When pgAgent executes a scheduled job, it generates a directory name in a temporary location to store the script before execution. Because the random number generator is predictable, a local attacker with low privileges can anticipate the directory name and pre-create it. This pre-creation causes pgAgent to fail in creating the directory and thus prevents the execution of scheduled jobs. The vulnerability impacts availability by disrupting automated batch jobs but does not affect confidentiality or integrity of data. Exploitation requires local access with low privileges but no user interaction. The CVSS 3.1 score is 5.5, reflecting medium severity due to the limited attack vector and impact confined to availability. No known exploits are currently reported in the wild. The vulnerability was published on January 7, 2025, and the fix is available in pgAgent version 4.2.3 and later. Organizations using pgAgent for PostgreSQL job scheduling should prioritize patching to ensure reliable task execution.

Potential Impact

For European organizations, this vulnerability primarily threatens the availability of automated batch jobs managed by pgAgent. Disruption of scheduled tasks can affect database maintenance, backups, data processing pipelines, and other critical automated workflows. This can lead to operational delays, increased manual intervention, and potential compliance issues if scheduled jobs are part of regulatory reporting or data retention processes. While the vulnerability does not expose sensitive data or allow unauthorized data modification, the interruption of services can degrade business continuity and impact dependent applications. Organizations with complex PostgreSQL environments relying heavily on pgAgent for automation are at higher risk. The requirement for local access limits remote exploitation, but insider threats or compromised internal accounts could leverage this vulnerability. The medium severity rating indicates a moderate risk that should be addressed promptly to maintain operational stability.

Mitigation Recommendations

The primary mitigation is to upgrade pgAgent to version 4.2.3 or later, where the random number generator seeding issue has been resolved. Until patching is possible, organizations should restrict local user permissions to prevent unauthorized users from creating directories in the temporary locations used by pgAgent. Implement strict access controls and monitoring on systems running pgAgent to detect suspicious directory creation attempts. Consider isolating pgAgent execution environments to minimize the number of users with local access. Regularly audit scheduled job execution logs to identify failures potentially caused by this vulnerability. Additionally, review and harden the system's temporary directory permissions and consider using filesystem-level protections such as mandatory access controls (e.g., SELinux, AppArmor) to prevent unauthorized directory manipulation. Incorporating these measures will reduce the risk of exploitation and maintain job scheduling reliability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.2
Assigner Short Name
PostgreSQL
Date Reserved
2025-01-04T02:53:10.494Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6908ed741c2a0078ae51027a

Added to database: 11/3/2025, 5:59:16 PM

Last enriched: 11/3/2025, 6:02:34 PM

Last updated: 11/3/2025, 8:54:12 PM

Views: 4

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats