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-2024-25885: n/a

0
High
VulnerabilityCVE-2024-25885cvecve-2024-25885
Published: Tue Oct 08 2024 (10/08/2024, 00:00:00 UTC)
Source: CVE Database V5

Description

An issue in the getcolor function in utils.py of xhtml2pdf v0.2.13 allows attackers to cause a Regular expression Denial of Service (ReDOS) via supplying a crafted string.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 02/28/2026, 09:58:35 UTC

Technical Analysis

CVE-2024-25885 identifies a Regular Expression Denial of Service (ReDoS) vulnerability in the getcolor function within the utils.py file of the xhtml2pdf library version 0.2.13. The vulnerability arises because the function processes user-supplied strings with a regular expression that can be exploited by specially crafted input to cause excessive backtracking. This leads to high CPU consumption and potentially crashes or severely degrades the availability of services relying on xhtml2pdf for PDF rendering. The vulnerability does not affect confidentiality or integrity but impacts availability significantly. The CVSS v3.1 score is 7.5 (high), reflecting the network attack vector, low attack complexity, no privileges required, no user interaction, and an impact limited to availability. No patches or fixes have been published yet, and no known exploits have been observed in the wild. The vulnerability is classified under CWE-1333, which relates to ReDoS issues caused by inefficient regular expressions. Because xhtml2pdf is a popular Python library used in web applications and automated document generation, this vulnerability could be leveraged by attackers to disrupt services by sending malicious input to affected endpoints that utilize this library.

Potential Impact

The primary impact of CVE-2024-25885 is on the availability of systems using xhtml2pdf for PDF generation. An attacker can remotely trigger a denial of service by sending crafted input that causes the vulnerable regular expression to consume excessive CPU resources. This can lead to service outages, degraded performance, or crashes, affecting business continuity and user experience. Since the vulnerability requires no authentication or user interaction, it can be exploited by unauthenticated remote attackers, increasing the risk. Organizations relying on automated PDF generation in web services, reporting tools, or document workflows are particularly vulnerable. While confidentiality and integrity are not directly affected, the denial of service can indirectly impact operational capabilities and potentially lead to cascading failures in dependent systems. The lack of an official patch increases exposure time, and the absence of known exploits suggests a window for proactive mitigation. The impact is global but more pronounced in regions with widespread use of Python web frameworks and document processing solutions.

Mitigation Recommendations

Until an official patch is released, organizations should implement several specific mitigations: 1) Apply strict input validation and sanitization on all user-supplied data that may reach the getcolor function or any part of xhtml2pdf to block or limit potentially malicious strings. 2) Introduce timeouts or resource limits on regex processing operations to prevent excessive CPU consumption. 3) Monitor application performance and resource usage closely to detect abnormal spikes indicative of ReDoS attempts. 4) Consider isolating PDF generation services in separate containers or sandboxes to limit the impact of potential denial of service. 5) Review and update dependencies regularly and subscribe to security advisories for xhtml2pdf to apply patches promptly once available. 6) If feasible, temporarily replace or disable features relying on the vulnerable function until a fix is deployed. 7) Employ Web Application Firewalls (WAFs) with custom rules to detect and block suspicious input patterns targeting this vulnerability. These targeted actions go beyond generic advice and focus on mitigating the specific ReDoS vector in xhtml2pdf.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.1
Assigner Short Name
mitre
Date Reserved
2024-02-12T00:00:00.000Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 699f6d73b7ef31ef0b572405

Added to database: 2/25/2026, 9:45:23 PM

Last enriched: 2/28/2026, 9:58:35 AM

Last updated: 4/12/2026, 1:56:42 PM

Views: 15

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 more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses