pdfmake, Allocation of Resources Without Limits or Throttling, CVE-2025-45421 (High)

Listen to this Post

How the mentioned CVE works:

The vulnerability CVE-2025-45421 in pdfmake arises from its handling of external files embedded within a PDF document. When a PDF is generated, pdfmake can be configured to fetch and embed images or other resources from a provided URL. The library fails to implement proper throttling or limits on HTTP redirects. An attacker can craft a malicious URL that points to a server which responds with an infinite chain of HTTP redirects (e.g., 301, 302). When pdfmake attempts to retrieve this resource, it will blindly follow each redirect in an endless loop. This process consumes significant CPU cycles and memory, leading to a Denial-of-Service (DoS) condition where the application becomes unresponsive or crashes, unable to complete the PDF generation task.
Platform: Node.js
Version: <0.3.0-beta.17

Vulnerability : DoS

Severity: High

date: 2025-10-07

Prediction: 2025-10-21

What Undercode Say:

curl -I http://attacker-server/infinite-redirect
var dd = {
content: [
{
image: 'http://attacker-server/infinite-redirect',
width: 500
}
]
};

How Exploit:

Create a malicious web server that responds to any request with an HTTP 302 redirect to itself, creating an infinite loop. Provide the URL of this server as an image source in a pdfmake document definition. When a victim’s application uses pdfmake to generate a PDF, the library will attempt to fetch the image and enter an endless redirect cycle, exhausting resources.

Protection from this CVE:

Update pdfmake to version 0.3.0-beta.17 or later. The patched version introduces a maximum redirect limit, preventing infinite loops. If an immediate update is not possible, implement a network-level firewall rule to block outbound requests to untrusted domains or use a middleware proxy to validate and sanitize all external URLs before they are passed to pdfmake.

Impact:

Application Denial-of-Service, resource exhaustion, failed PDF generation, and degraded system performance for all users, potentially disrupting critical business functions reliant on report generation.

🎯Let’s Practice Exploiting & Learn Patching For Free:

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top