CVE-2020-36644: Inline SVG vulnerable to Cross-site Scripting
6.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.292%
CWE
Published
1/7/2023
Updated
10/20/2023
KEV Status
No
Technology
Ruby
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| inline_svg | rubygems | < 1.7.2 | 1.7.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the unescaped filename parameter in the placeholder method. The commit diff shows the fix adds ERB::Util.html_escape_once to sanitize the filename. This function constructs error messages displayed in HTML comments, and prior to patching, user-controlled input (filename) was directly embedded without sanitization, enabling XSS when the SVG file wasn't found. The added spec test explicitly verifies escaping of malicious input in this context.