7.3
HIGH
CVE-2020-4054
Sanitize Cross-Site Scripting (XSS) Vulnerability
Description

In Sanitize (RubyGem sanitize) greater than or equal to 3.0.0 and less than 5.2.1, there is a cross-site scripting vulnerability. When HTML is sanitized using Sanitize's "relaxed" config, or a custom config that allows certain elements, some content in a math or svg element may not be sanitized correctly even if math and svg are not in the allowlist. You are likely to be vulnerable to this issue if you use Sanitize's relaxed config or a custom config that allows one or more of the following HTML elements: iframe, math, noembed, noframes, noscript, plaintext, script, style, svg, xmp. Using carefully crafted input, an attacker may be able to sneak arbitrary HTML through Sanitize, potentially resulting in XSS (cross-site scripting) or other undesired behavior when that HTML is rendered in a browser. This has been fixed in 5.2.1.

INFO

Published Date :

June 16, 2020, 10:15 p.m.

Last Modified :

Sept. 28, 2020, 8:15 p.m.

Remotely Exploitable :

Yes !

Impact Score :

3.4

Exploitability Score :

3.9
Public PoC/Exploit Available at Github

CVE-2020-4054 has a 1 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

Affected Products

The following products are affected by CVE-2020-4054 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Sanitize_project sanitize
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2020-4054.

URL Resource
https://github.com/rgrove/sanitize/commit/a11498de9e283cd457b35ee252983662f7452aa9 Patch Third Party Advisory
https://github.com/rgrove/sanitize/releases/tag/v5.2.1 Release Notes Third Party Advisory
https://github.com/rgrove/sanitize/security/advisories/GHSA-p4x4-rw2p-8j8m Third Party Advisory
https://usn.ubuntu.com/4543-1/
https://www.debian.org/security/2020/dsa-4730

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

安全类各家文库大乱斗

HTML CSS JavaScript Go Python Shell C

Updated: 2 months, 2 weeks ago
856 stars 214 fork 214 watcher
Born at : Feb. 15, 2022, 3:14 a.m. This repo has been linked 568 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2020-4054 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2020-4054 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    Sep. 28, 2020

    Action Type Old Value New Value
    Added Reference https://usn.ubuntu.com/4543-1/ [No Types Assigned]
  • CVE Modified by [email protected]

    Jul. 19, 2020

    Action Type Old Value New Value
    Added Reference https://www.debian.org/security/2020/dsa-4730 [No Types Assigned]
  • Initial Analysis by [email protected]

    Jun. 19, 2020

    Action Type Old Value New Value
    Added CVSS V2 NIST (AV:N/AC:M/Au:N/C:P/I:P/A:P)
    Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
    Changed Reference Type https://github.com/rgrove/sanitize/commit/a11498de9e283cd457b35ee252983662f7452aa9 No Types Assigned https://github.com/rgrove/sanitize/commit/a11498de9e283cd457b35ee252983662f7452aa9 Patch, Third Party Advisory
    Changed Reference Type https://github.com/rgrove/sanitize/releases/tag/v5.2.1 No Types Assigned https://github.com/rgrove/sanitize/releases/tag/v5.2.1 Release Notes, Third Party Advisory
    Changed Reference Type https://github.com/rgrove/sanitize/security/advisories/GHSA-p4x4-rw2p-8j8m No Types Assigned https://github.com/rgrove/sanitize/security/advisories/GHSA-p4x4-rw2p-8j8m Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:a:sanitize_project:sanitize:*:*:*:*:*:ruby:*:* versions from (including) 3.0.0 up to (excluding) 5.2.1
  • CVE Modified by [email protected]

    Jun. 16, 2020

    Action Type Old Value New Value
    Changed Description In Sanitize (RubyGem sanitize) greater than or equal to 3.0.0 and less than 5.2.1, there is a cross-site scripting vulnerability. When HTML is sanitized using Sanitize's "relaxed" config, or a custom config that allows certain elements, some content in a math or svg element may not be sanitized correctly even if math and svg are not in the allowlist. You are likely to be vulnerable to this issue if you use Sanitize's relaxed config or a custom config that allows one or more of the following HTML elements: iframe, math, noembed, noframes, noscript, plaintext, script, style, svg, xmp. Using carefully crafted input, an attacker may be able to sneak arbitrary HTML through Sanitize, potentially resulting in XSS (cross-site scripting) or other undesired behavior when that HTML is rendered in a browser. This has been fixed in 5.2.1. In Sanitize (RubyGem sanitize) greater than or equal to 3.0.0 and less than 5.2.1, there is a cross-site scripting vulnerability. When HTML is sanitized using Sanitize's "relaxed" config, or a custom config that allows certain elements, some content in a math or svg element may not be sanitized correctly even if math and svg are not in the allowlist. You are likely to be vulnerable to this issue if you use Sanitize's relaxed config or a custom config that allows one or more of the following HTML elements: iframe, math, noembed, noframes, noscript, plaintext, script, style, svg, xmp. Using carefully crafted input, an attacker may be able to sneak arbitrary HTML through Sanitize, potentially resulting in XSS (cross-site scripting) or other undesired behavior when that HTML is rendered in a browser. This has been fixed in 5.2.1.
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2020-4054 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2020-4054 weaknesses.

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.14 }} -0.00%

score

0.49360

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability