PHP2Shell: Read our blog on the critical RCE vulnerabilities affecting 70% of the Internet
Vulnerability DatabaseGHSA-249c-7rgc-f52h

GHSA-249c-7rgc-f52h: 
Python vulnerability analysis and mitigation

Summary

The SVG <path> elliptical-arc parser in svglib.utils.split_arc_values() builds a regex with multiple empty-matchable float groups and two mandatory flag groups, then runs it under re.finditer(). An arc argument that is a long run of digits (containing no 0/1 where a flag is expected) triggers catastrophic backtracking whose cost grows exponentially (~2x per ~4 extra digits). Reachable from any untrusted SVG via svg2rlg / svg2pdf.

Details

svglib/utils.py builds:

float_re = r"(-?\d*\.?\d*(?:[eE][+-]?\d+)?)"            # matches the empty string
a_seq_re = r"[\s,]*".join([float_re]*3 + [flag_re]*2 + [float_re]*2) + r"[\s,]*"
re.finditer(a_seq_re, value)                            # value = a <path> arc argument

Because the float groups can match empty, a digit run with no valid flag char forces the engine to try ~2^(n/4) ways to split the run across the leading float groups, each failing at the mandatory flag group. Path: svg2rlg() -> normalise_svg_path() -> split_arc_values(). Affected: svglib <= 2.3.0. CWE-1333/400/407 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (7.5).

Proof of concept

from svglib.utils import split_arc_values   # reached via svg2rlg -> normalise_svg_path
split_arc_values("A", "9" * 60)             # ~60-digit arc argument: does not return

Verified on PyPI svglib 2.3.0 (cost ~2x per 4 extra digits): 42 digits -> 6.7s, 50 -> ~30s; a ~60-80 digit arc argument (a ~120-150 byte SVG) runs for minutes to hours. The regex runs in C and cannot be interrupted by signal.alarm; a subprocess timeout is required.

Impact

A single small SVG blocks the worker for minutes-to-indefinitely (CPU) -> one-request DoS for any svg2rlg/svg2pdf caller. Same class as CairoSVG ReDoS (CVE-2021-21236).


Source: NVD

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-57121HIGH8.1
  • Python logoPython
  • praisonai-platform
NoYesOct 23, 2026
GHSA-249c-7rgc-f52hHIGH7.5
  • Python logoPython
  • svglib
NoYesOct 23, 2026
GHSA-h8jf-9f4f-2v9hMEDIUM6.8
  • Python logoPython
  • docling
NoYesOct 23, 2026
CVE-2026-54711LOW2.4
  • Python logoPython
  • pghoard
NoNoOct 23, 2026
GHSA-g536-hq2j-5mpfLOWN/A
  • Python logoPython
  • openai4s
NoNoOct 23, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management