Skip to content
OpenAdvisories
Medium · 6.5 CVE-2026-114610 EUVD-2026-108262GHSA-wqw6-wpr3-45rh

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

Published Oct 22, 2026 · Updated Oct 29, 2026 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
py-pdf fpdf2 >= 2.5.0, < 2.8.8 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 fpdf2 2.8.8-1 —
Debian 13 fpdf2 No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI fpdf2 >= 2.5.0, < 2.8.8 2.8.8 GHSA-wqw6-wpr3-45rh

References