svglib@0.9.0b0

A pure-Python library for reading and converting SVG

  • latest version

    2.5.0

  • latest non vulnerable version

  • first published

    18 years ago

  • latest version published

    2 hours ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the svglib package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • H
    Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')

    svglib is a library for reading SVG files and converting them (to a reasonable degree) to other formats using the ReportLab Open Source toolkit.

    Affected versions of this package are vulnerable to Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion') via SvgRenderer.renderUse() in svg2rlg(), which expands <use> references without any limit on the total number of expansions. Only direct cycles are rejected via CircularRefError, so a reference DAG with fan-out is expanded fully: a group containing N <use> elements pointing to another such group multiplies work by N per nesting level, producing fan ** levels renders. An attacker can supply an SVG of about 1.4 KB that causes svglib to clone and render over 100,000 nodes, consuming tens of seconds of CPU time and hundreds of MiB of memory. This is the SVG <use> variant of the XML "billion laughs" attack, the same class as librsvg CVE-2019-20446.

    How to fix Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')?

    Upgrade svglib to version 2.3.1 or higher.

    [,2.3.1)
    • M
    XML External Entity (XXE) Injection

    svglib is a library for reading SVG files and converting them (to a reasonable degree) to other formats using the ReportLab Open Source toolkit.

    Affected versions of this package are vulnerable to XML External Entity (XXE) Injection via an svg2rlg call.

    How to fix XML External Entity (XXE) Injection?

    Upgrade svglib to version 0.9.4 or higher.

    [0,0.9.4)