CVE-2023-27586CWE-20CWE-918

CairoSVG improperly processes SVG files loaded from external resources

Critical · published March 20, 2023

CVSS v3.1
9.9
EPSS
1%
Percentile
53.5
In the wild
Unconfirmed
What it is

🚨 Prior to version 2.7.0, CairoSVG can be tricked into sending requests to external servers simply by processing a malicious SVG file – it's like handing your delivery person a package addressed to someone else without checking the label! 🔥 Think of CairoSVG as a busy restaurant that accidentally accepts takeout orders meant for other establishments. If the chef isn't careful about checking the order details, they might deliver sensitive information to a rival restaurant instead! An attacker could exploit this vulnerability to perform server-side request forgery (SSRF), potentially gaining unauthorized access to internal services. This could lead to information leaks or even denial of service, where legitimate operations are interrupted and users are left in the lurch.

Put simply

Think of CairoSVG as a busy restaurant that accidentally accepts takeout orders meant for other establishments. If the chef isn't careful about checking the order details, they might deliver sensitive information to a rival restaurant instead! CVE-2023-27586 allows malicious SVG files to manipulate CairoSVG into making unsolicited requests to external hosts, creating serious security risks for the server hosting the service. The issue stems from insufficient verification of external file requests during SVG processing.

What to do

An attacker could exploit this vulnerability to perform server-side request forgery (SSRF), potentially gaining unauthorized access to internal services. This could lead to information leaks or even denial of service, where legitimate operations are interrupted and users are left in the lurch. Immediately upgrade CairoSVG to version 2.7.0 or later, which disables the ability to access external files by default. Further, consider implementing additional input validation and monitoring to catch any suspicious SVG files in the future. You've got this! With these steps, you’ll ensure your server stays secure and your SVG processing is safe. 🛡️

The record
Technical detail
CVSS v3.1
9.9 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:L
CVSS v4.0
Not supplied
EPSS
0.00722 · 53.5th percentile
Weaknesses
CWE-20 · Improper Input Validation; CWE-918 · Server-Side Request Forgery (SSRF)
Published
2023-03-20T15:23Z
EPSS history
Timeline
  • 20 MAR 15:23Z
    CairoSVG improperly processes SVG files loaded from external resources
    cvelistv5