Skip to main content
← All vulnerabilities
CVE-2026-114610EUVD-2026-108262GHSA-WQW6-WPR3-45RH

fpdf2: Exponential SVG '<use>' expansion causes CPU and memory exhaustion in 'FPDF.image()'

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 2.8.8
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: partial

Summary

fpdf2, a Python library for creating PDF files, is affected when it processes SVG images through its image-inserting function. A small, specially crafted SVG file with deeply nested references can make the library use excessive CPU and memory, causing PDF generation to fail and potentially slowing down or exhausting the server or worker processes handling the job.

Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.

Read the original description

fpdf2 is a PDF creation library for Python. From 2.5.0 until 2.8.8, fpdf2's SVGObject.build_xref() passes nested SVG <use> references to GraphicsContext.add_item(), whose default clone=True deep-copy behavior copies the complete referenced graphics tree during FPDF.image() processing. Repeating references at each nesting level makes the in-memory object count and processing work grow exponentially, allowing a small user-controlled SVG to consume excessive CPU and memory, raise MemoryError, fail PDF generation jobs, and reduce or exhaust worker capacity. ResourceAccessPolicy does not prevent the issue because the references are inline and require no external resource, XML entity, local file, or permissive network setting. This issue is fixed in version 2.8.8.

Timeline

  1. CVE published
  2. First seen by cve.now
  3. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: partial

  4. Record last updated

Affected versions

  • py-pdf fpdf2

    From 2.5.0 · fixed in 2.8.8

  • fpdf2PyPI

    From 2.5.0 · fixed in 2.8.8

References 4

GitHub · py-pdf/fpdf2