← VULNERABILITIES

CVE-2026-132275

svglib: Exponential resource consumption via nested <use> references in svg2rlg

High · 7.5Fix available
CVSS
7.5
EPSS
0.61% (p43)
Published
2026-11-20
Age
11d old
Modified
2026-11-21
Product
deeplook svglib
Aliases
GHSA-555j-qj3j-c8jv

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Description

svglib reads SVG files and converts them to other formats. Prior to 2.3.1, the svg2rlg() renderer recursively expands nested SVG <use> references by deep-copying each referenced subtree; SvgRenderer.renderUse() in src/svglib/svglib.py calls xlink_href_target(), which rejects direct cycles but permits acyclic reference graphs with repeated fan-out. A small attacker-controlled SVG can therefore trigger exponentially increasing node expansion, consuming excessive CPU and memory in any application that renders it without a non-default option; HTML-to-PDF workflows using xhtml2pdf can reach the same renderer when an embedded data:image/svg+xml image in an HTML img element is passed to pisa.CreatePDF(). This issue is fixed in 2.3.1.

Fixed in

2.3.1

Affected packages

EcosystemPackageRangeFixed
PyPIsvglib<= 2.3.02.3.1
PyPIsvglib>=0, <2.3.12.3.1

Sources

  • NVD · first seen 11d ago · NVD terms of use
  • OSV · first seen 11d ago · CC-BY 4.0
  • GitHub Advisory Database · first seen 11d ago · CC-BY 4.0
  • CVE List · first seen 11d ago · CVE Terms of Use

References

JSON