PyPI
CVE-2026-114610
fpdf2: Exponential SVG '<use>' expansion causes CPU and memory exhaustion in 'FPDF.image()'
- Severity
- Medium 6.5
- Published
- 27 Oct 2026
- Last changed
- 27 Oct 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 2.8.8
- Exploit chance
- 0.5% in the next 30 daysHigher than 40% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Over the network · Needs a user account · No user action needed
- Attacker can
- Take it down
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H- Also known as
- GHSA-wqw6-wpr3-45rh
- Sources
- OSV.dev and GitHub
Description
fpdf2 expands SVG references by deep-copying the complete referenced graphics tree. A small SVG can use nested references to make the number of in-memory objects grow exponentially, causing excessive CPU and memory consumption during FPDF.image()` processing.
This was reproduced with an 895-byte SVG on fpdf2 2.8.7. Under a 128 MB process limit, the input kept the process busy for about 14 seconds before raising MemoryError.
The issue is in fpdf2's own SVG reference handling. It does not rely on XML entities, external URLs, local files, or vulnerable behavior in another dependency.
When fpdf2 resolves an SVG reference, SVGObject.build_xref() passes the referenced object to GraphicsContext.add_item():
GraphicsContext.add_item() uses clone=True by default and deep-copies the object:
An attacker can define g1 as eight references to g0, g2 as eight references to g1, and so on. Each level adds only a small amount of XML, but fpdf2 copies the entire tree from the previous level eight…
Affected software
| Software | Affected versions |
|---|---|
fpdf2PyPI · osv:PyPI:fpdf2 |
|
About fpdf2
- Weekly downloads (PyPI)
- 6,861,057PyPI Stats, 23 Nov 2026
Vulnerabilities in fpdf2
- In our list
- 2
- Published in the last 12 months
- 2
- Critical, last 12 months
- 0
- High, last 12 months
- 0
- Known exploited
- 0
- CVE-2026-114609fpdf2 implicitly loads external URLs and local image paths when rendering attacker-controlled contentMedium 5.8 27 Oct 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-114610
- GitHub Advisory Database https://github.com/advisories/GHSA-wqw6-wpr3-45rh