Skip to content
Heist/ feed
Back to feed
High

cairosvg — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2026-107378

CairoSVG is an SVG converter based on Cairo, a 2D graphics library. Prior to 2.9.1, rendering an attacker-controlled SVG with a path containing many segments can cause quadratic CPU consumption in cairosvg/path.py. The path tokenizer repeatedly slices and rescans the remaining path data, while draw_markers drains node.vertices with node.vertices.pop(0), causing repeated linear-time work. The svg2png, svg2pdf, and svg2ps APIs reach these operations during ordinary rendering, allowing a sub-megabyte SVG to consume substantial CPU and deny service to a rendering application. This issue is fixed in version 2.9.1.

Products
cairosvg
Affected versions
1.0.16-1, 1.0.17-1, 1.0.19-1, 1.0.20-1, 2.4.0-2, 2.4.2-1, 2.5.0-1.1, 2.5.2-1, 2.7.1-1
Fixed versions
Not specified
CVEs
CVE-2026-107378
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 02:00 UTC · Revision 1

Source evidence

UBUNTU-CVE-2026-107378

core-osv · Original source

Published 8 Oct 2026, 18:17 UTC

CairoSVG is an SVG converter based on Cairo, a 2D graphics library. Prior to 2.9.1, rendering an attacker-controlled SVG with a path containing many segments can cause quadratic CPU consumption in cairosvg/path.py. The path tokenizer repeatedly slices and rescans the remaining path data, while draw_markers drains node.vertices with node.vertices.pop(0), causing repeated linear-time work. The svg2png, svg2pdf, and svg2ps APIs reach these operations during ordinary rendering, allowing a sub-megabyte SVG to consume substantial CPU and deny service to a rendering application. This issue is fixed in version 2.9.1.

osv:UBUNTU-CVE-2026-107378

cairosvg

Fixed versions: Not specified

cairosvg

Fixed versions: Not specified

cairosvg

Fixed versions: Not specified

cairosvg

Fixed versions: Not specified

cairosvg

Fixed versions: Not specified

Complete source record
{
  "id": "5f46f7eb4ab52f4ad97da7c61ec42c741b806abc46afd7cd2f9c976198ab5404",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-107378",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2026-107378",
    "summary": "CairoSVG is an SVG converter based on Cairo, a 2D graphics library. Prior to 2.9.1, rendering an attacker-controlled SVG with a path containing many segments can cause quadratic CPU consumption in cairosvg/path.py. The path tokenizer repeatedly slices and rescans the remaining path data, while draw_markers drains node.vertices with node.vertices.pop(0), causing repeated linear-time work. The svg2png, svg2pdf, and svg2ps APIs reach these operations during ordinary rendering, allowing a sub-megabyte SVG to consume substantial CPU and deny service to a rendering application. This issue is fixed in version 2.9.1.",
    "evidence": "osv:UBUNTU-CVE-2026-107378",
    "products": [
      {
        "name": {
          "value": "cairosvg",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.0.16-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.0.17-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.0.19-1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "cairosvg",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.0.20-1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "cairosvg",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.4.0-2",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "2.4.2-1",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "cairosvg",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.5.0-1.1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "2.5.2-1",
            "evidence": "/affected/3/versions"
          }
        ]
      },
      {
        "name": {
          "value": "cairosvg",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.7.1-1",
            "evidence": "/affected/4/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "UBUNTU-CVE-2026-107378",
      "aliases": [
        "UBUNTU-CVE-2026-107378"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "cairosvg",
            "purl": "pkg:deb/ubuntu/cairosvg?arch=source&distro=xenial",
            "ecosystem": "Ubuntu:16.04:LTS"
          },
          "versions": [
            "1.0.16-1",
            "1.0.17-1",
            "1.0.19-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-107378.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python-cairosvg",
                "binary_version": "1.0.19-1"
              },
              {
                "binary_name": "python3-cairosvg",
                "binary_version": "1.0.19-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "cairosvg",
            "purl": "pkg:deb/ubuntu/cairosvg?arch=source&distro=bionic",
            "ecosystem": "Ubuntu:18.04:LTS"
          },
          "versions": [
            "1.0.20-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-107378.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python-cairosvg",
                "binary_version": "1.0.20-1"
              },
              {
                "binary_name": "python3-cairosvg",
                "binary_version": "1.0.20-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "cairosvg",
            "purl": "pkg:deb/ubuntu/cairosvg?arch=source&distro=focal",
            "ecosystem": "Ubuntu:20.04:LTS"
          },
          "versions": [
            "2.4.0-2",
            "2.4.2-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-107378.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "cairosvg",
                "binary_version": "2.4.2-1"
              },
              {
                "binary_name": "python3-cairosvg",
                "binary_version": "2.4.2-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "cairosvg",
            "purl": "pkg:deb/ubuntu/cairosvg?arch=source&distro=jammy",
            "ecosystem": "Ubuntu:22.04:LTS"
          },
          "versions": [
            "2.5.0-1.1",
            "2.5.2-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-107378.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "cairosvg",
                "binary_version": "2.5.2-1"
              },
              {
                "binary_name": "python3-cairosvg",
                "binary_version": "2.5.2-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "cairosvg",
            "purl": "pkg:deb/ubuntu/cairosvg?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "2.7.1-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-107378.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "cairosvg",
                "binary_version": "2.7.1-1"
              },
              {
                "binary_name": "python3-cairosvg",
                "binary_version": "2.7.1-1"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T12:58:01.405773236Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-107378"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2026-107378",
        "https://www.cve.org/CVERecord?id=CVE-2026-107378",
        "https://github.com/Kozea/CairoSVG/commit/9d63f049f9988d0ddda3eb94564ac3a50a286523",
        "https://github.com/Kozea/CairoSVG/commit/a4d585eb374724b79676e9cceaa9e9a1a4358565",
        "https://github.com/Kozea/CairoSVG/releases/tag/2.9.1",
        "https://github.com/Kozea/CairoSVG/security/advisories/GHSA-c3jg-qh8m-j3h2"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-107378",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 357878,
  "published_at": "2026-10-08T18:17:00+00:00"
}