Read the docs

Exponential SVG use expansion exhausts CPU and memory in fpdf2

Priority MEDIUM 62CWE-400Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
Low
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-400.

Summary

The fpdf2 PDF creation library for Python, from 2.5.0 before 2.8.8, deep copies nested SVG use references during FPDF.image() processing. Repeated references at each nesting level make the object count and processing work grow exponentially (CWE-400). A user with low privileges who supplies a small crafted SVG can exhaust CPU and memory, raising MemoryError and failing PDF generation jobs.

Written with Claude Haiku 5.5 from the sources below · 2026-10-29

Description from the CNA

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00459 39th percentileScored 2026-11-07
Fix Fixed fpdf2 (py-pdf): 2.8.8fpdf2 (PyPI): 2.8.8

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
py-pdffpdf22.5.0 to before 2.8.82.8.8Patch availableCNA
—fpdf2 (PyPI)2.5.0 to before 2.8.82.8.8Patch availableGHSA-wqw6-wpr3-45rh
  • fpdf2 Vendorpy-pdf Affected 2.5.0 to before 2.8.8 Fixed in 2.8.8 Patch available CNA
  • fpdf2 (PyPI) Vendor— Affected 2.5.0 to before 2.8.8 Fixed in 2.8.8 Patch available GHSA-wqw6-wpr3-45rh

Remediation

Upgrade fpdf2 to version 2.8.8 or later, which fixes the flaw in the PyPI package.

Written with Claude Haiku 5.5 from the sources below · 2026-10-29

  • Fix · CNA fpdf2 (py-pdf) Fixed in 2.8.8
  • Fix · GHSA-wqw6-wpr3-45rh fpdf2 (PyPI) Fixed in 2.8.8 Advisory →

Timeline

  1. 2026-10-22 Threatist record created from CVE-2026-114610
  2. 2026-10-23 Priority changed: MEDIUM → LOW
  3. 2026-10-27 Alias added: GHSA-wqw6-wpr3-45rh
  4. 2026-10-29 CISA SSVC decision points changed
  5. 2026-10-29 Priority changed: LOW → MEDIUM

References

  • TI-2023-18601 Infinite Loop when reading malformed objects in pypdf CVSS 3.1MEDIUM 6.5
  • TI-2023-18305 Infinite Loop when a comment isn't followed by a character in pypdf CVSS 3.1MEDIUM 6.2
  • TI-2022-08670 Manipulated inline images can cause Infinite Loop in PyPDF2 CVSS 3.1MEDIUM 6.2
  • TI-2026-42743 pypdf: Possible infinite loop for not terminated inline images CVSS 4.0HIGH 8.7
  • TI-2026-42742 pypdf: Possible infinite loop for not terminated inline images (ASCII85 and ASCIIHex filter) CVSS 4.0HIGH 8.7
  • TI-2026-65557 pypdf: Possible large memory usage when retrieving alphabetical page labels CVSS 4.0HIGH 8.7
See all 73 →

Sources