The svglib library's svg2rlg() function expands SVG <use> references recursively without limiting the total expansions, except for direct cycles. This allows crafted SVGs with nested <use> elements to cause exponential growth in rendering work, leading to high CPU and memory usage. This vulnerability can cause denial of service when rendering untrusted SVG content, including via xhtml2pdf which depends on svglib. A fix is available in svglib 2.3.1 that limits the number of <use> expansions to prevent resource exhaustion.