Description
svglib before 2.5.0 contains a denial of service vulnerability in SvgRenderer.renderNode() that recursively renders internal <image> href fragment references without expansion limits or cycle detection. Attackers can supply crafted SVGs to svg2rlg() with nested groups referencing each other twice or self-referencing images to cause exponential resource consumption or RecursionError crashes.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| deeplook | svglib | < 2.5.0 | 2.5.0 |
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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | python-svglib | No fix yet | — |
| Debian 13 | python-svglib | No fix yet | — |
| Debian 12 | python-svglib | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | python-svglib | No fix yet | — |
| Ubuntu 26.04 LTS | python-svglib | No fix yet | — |
| Ubuntu 24.04 LTS | python-svglib | No fix yet | — |
| Ubuntu 22.04 LTS | python-svglib | No fix yet | — |
References
- GitHub Security Advisory (GHSA-cmj4-5g24-pp37) vendor-advisory
- https://github.com/deeplook/svglib/commit/be3c218c35845acb5ad88cca6352a85b0eaad00e patch
- svglib v2.5.0 Release Notes release-notes
- https://github.com/deeplook/svglib/blob/f99f799e6ed5841e3a405d0536a0a79ed991331c/src/svglib/svglib.py#L1427-L1440 technical-description
- VulnCheck Advisory: svglib before 2.5.0 Denial of Service via Recursive Image Fragment References third-party-advisory