CVE-2024-25885: An issue in the getcolor function in utils.py of xhtml2pdf v0.2.13 allows attackers to cause a Regular expr...
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.
Security readout for executives and security teams
Plain-English summary
CVE-2024-25885 is a denial-of-service issue in xhtml2pdf v0.2.13. A crafted input to color parsing can trigger excessive regular-expression processing, potentially tying up CPU and disrupting PDF generation services that process untrusted content.
Executive priority
Prioritize if public users can trigger PDF creation. The business risk is service disruption rather than data theft, but affected document-generation workflows can become unavailable under low-effort remote abuse.
Technical view
The issue is in xhtml2pdf v0.2.13, specifically getcolor in utils.py. The assigned weakness is CWE-1333, inefficient regular expression complexity. CVSS 3.1 is 7.5, network exploitable with low complexity and availability-only impact.
Likely exposure
Exposure is most likely where xhtml2pdf v0.2.13 converts attacker-controlled or user-supplied HTML/CSS into PDFs, especially public web apps, APIs, reporting systems, and document workflows.
Exploitation context
The bundle does not show CISA KEV listing or cited evidence of active exploitation. The CVSS vector indicates remote, unauthenticated, no-user-interaction denial-of-service potential against reachable services using the vulnerable parser.
Researcher notes
The provided CVE data names xhtml2pdf v0.2.13 and getcolor in utils.py, but affected CPEs and official remediation details are absent. Treat version and fix status as needing confirmation from upstream project sources.
Mitigation direction
Inventory applications and containers using xhtml2pdf v0.2.13.
Check xhtml2pdf project guidance for fixed versions or official workarounds.
Avoid passing untrusted HTML or CSS directly to PDF conversion.
Apply CPU, memory, and execution-time limits around PDF generation jobs.
Queue and rate-limit externally triggered PDF generation.
Monitor conversion failures, worker timeouts, and CPU spikes.
Validation and detection
Search dependency manifests and lockfiles for xhtml2pdf v0.2.13.
Confirm whether PDF conversion accepts user-controlled HTML, CSS, or templates.
Review application routes or jobs that invoke xhtml2pdf.
Check logs for repeated conversion timeouts or high CPU events.
Verify vendor or project advisories before declaring remediation complete.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-1333: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-1333 · source CWE mapping
Inefficient Regular Expression Complexity
Inefficient Regular Expression Complexity represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.