🛑 Denial of Service (DoS) Mitigation
The generation of PDF files requires building a Document Object Model (DOM) in the web server’s RAM before the final rendering via Dompdf. An attack that intentionally sends hundreds of thousands of records could exhaust the container’s memory. To avoid this scenario, a dynamic volume validation rule was implemented:💉 HTML Injection and SSRF Prevention
There is an inherent risk when rendering PDFs from external data: if thedetalle field of a transaction contains malicious HTML tags (such as <script>, <iframe> or <link>), the engine could attempt to interpret them, leading to HTML Injection or Server-Side Request Forgery (SSRF).
The architecture neutralizes this threat by delegating sanitization to the native syntax of Laravel Blade: