If you render user HTML, you have an SSRF problem. Here is the code that fixes it.
Every HTML-to-PDF service has the same shape. Someone hands you markup, you open it in headless...
🎯 Vulnerability: Server-Side Request Forgery (SSRF)
💡 Defense Fix: Enforce URL whitelisting, block private IP ranges (10.0.0.0/8, 169.254.169.254), and mandate AWS IMDSv2 headers.