The Daily Byte
Breaking
Welcome to The Daily Byte — real stories from across Pakistan.
Sunday, 29 November 2026 · Pakistan

The Daily Byte

Stories from Pakistan that deserve to be heard

CVE-2026-137952: Tiny SVG File Can Crash PDF Tools

By The Daily Byte ·28 Nov 2026 ·3 min read
A laptop computer showing the Windows start menu on its screen

A file smaller than an ordinary email can bring a document converter to its knees. The flaw, tracked as CVE-2026-137952, was published on 27 November 2026 and affects svglib, a Python library that turns SVG graphics into PDF-ready drawings. It carries a CVSS 4.0 score of 7.5, rated High, and needs no login and no user interaction beyond opening the file.

svglib is used by applications that accept SVG images from users and convert them into ReportLab drawings, usually as a step towards producing a PDF. That makes it a quiet piece of plumbing in document pipelines, invoicing tools, reporting systems and anywhere else a web service turns an uploaded graphic into a document. A crafted upload is all an attacker needs.

How a 1.5 KB file does the damage

The weakness is listed as CWE-674, uncontrolled recursion. Inside svglib, the function SvgRenderer.renderNode() follows internal image references — an image element whose href points to another part of the same document, such as href="#g3" — and re-renders the target without any limit on how many times it can expand, and without checking whether it is going in circles.

Nested groups that reference each other double the work at every level, so the load grows exponentially. The researchers showed that a 1,468-byte SVG reaches 131,071 recursive render calls in 1.70 seconds, and a slightly deeper file of about 1.9 KB hangs the process entirely while consuming gigabytes of memory. A two-line SVG in which an image references itself crashes the converter outright with a RecursionError. It is the classic billion-laughs pattern, rebuilt for vector graphics.

The earlier fix that missed a path

This is not svglib's first brush with runaway expansion. An earlier flaw, CVE-2026-132275, covered the same trick played through use elements, and version 2.3.1 added expansion counters and a cycle-detection stack to the function that handles those. But the image branch sits in the function just above it, and it was left unguarded. The new advisory shows the limits were never applied to that second path, so the same attack works through a different element.

Who is affected and what to do

Every svglib version before 2.5.0 is affected, and the fix is in 2.5.0. Anyone running a service that converts user-supplied SVG files should upgrade now. If an upgrade cannot happen immediately, stop converting untrusted SVGs, or run the conversion sandboxed with strict time and memory limits so a malicious file can only kill one worker, not the whole service.

The flaw is not listed in CISA's Known Exploited Vulnerabilities catalogue, and no public exploit code has been confirmed. But the advisory publishes working proof-of-concept files, so the window between disclosure and abuse is likely to be short. A one-kilobyte upload should never be able to take a service down, and after this fix it cannot.

Source
NVD — CVE-2026-137952 record — https://nvd.nist.gov/vuln/detail/CVE-2026-137952