CVE Vulnerabilities

CVE-2020-4046

Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)

Published: Jun 12, 2020 | Modified: Nov 21, 2024
CVSS 3.x
5.4
MEDIUM
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
CVSS 2.x
3.5 LOW
AV:N/AC:M/Au:S/C:N/I:P/A:N
RedHat/V2
RedHat/V3
Ubuntu
MEDIUM

In affected versions of WordPress, users with low privileges (like contributors and authors) can use the embed block in a certain way to inject unfiltered HTML in the block editor. When affected posts are viewed by a higher privileged user, this could lead to script execution in the editor/wp-admin. This has been patched in version 5.4.2, along with all the previously affected versions via a minor release (5.3.4, 5.2.7, 5.1.6, 5.0.10, 4.9.15, 4.8.14, 4.7.18, 4.6.19, 4.5.22, 4.4.23, 4.3.24, 4.2.28, 4.1.31, 4.0.31, 3.9.32, 3.8.34, 3.7.34).

Weakness

The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as “<”, “>”, and “&” that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages.

Affected Software

Name Vendor Start Version End Version
Wordpress Wordpress 3.7 (including) 3.7.34 (excluding)
Wordpress Wordpress 3.8 (including) 3.8.34 (excluding)
Wordpress Wordpress 3.9 (including) 3.9.32 (excluding)
Wordpress Wordpress 4.0 (including) 4.0.31 (excluding)
Wordpress Wordpress 4.1 (including) 4.1.31 (excluding)
Wordpress Wordpress 4.2 (including) 4.2.28 (excluding)
Wordpress Wordpress 4.3 (including) 4.3.24 (excluding)
Wordpress Wordpress 4.4 (including) 4.4.23 (excluding)
Wordpress Wordpress 4.5 (including) 4.5.22 (excluding)
Wordpress Wordpress 4.6 (including) 4.6.19 (excluding)
Wordpress Wordpress 4.7 (including) 4.7.18 (excluding)
Wordpress Wordpress 4.8 (including) 4.8.14 (excluding)
Wordpress Wordpress 4.9 (including) 4.9.15 (excluding)
Wordpress Wordpress 5.0 (including) 5.0.10 (excluding)
Wordpress Wordpress 5.1 (including) 5.1.6 (excluding)
Wordpress Wordpress 5.2 (including) 5.2.7 (excluding)
Wordpress Wordpress 5.3.0 (including) 5.3.4 (excluding)
Wordpress Wordpress 5.4 (including) 5.4.2 (excluding)
Wordpress Ubuntu bionic *
Wordpress Ubuntu eoan *
Wordpress Ubuntu groovy *
Wordpress Ubuntu hirsute *
Wordpress Ubuntu impish *
Wordpress Ubuntu kinetic *
Wordpress Ubuntu trusty *
Wordpress Ubuntu upstream *
Wordpress Ubuntu xenial *

Potential Mitigations

  • Use and specify an output encoding that can be handled by the downstream component that is reading the output. Common encodings include ISO-8859-1, UTF-7, and UTF-8. When an encoding is not specified, a downstream component may choose a different encoding, either by assuming a default encoding or automatically inferring which encoding is being used, which can be erroneous. When the encodings are inconsistent, the downstream component might treat some character or byte sequences as special, even if they are not special in the original encoding. Attackers might then be able to exploit this discrepancy and conduct injection attacks; they even might be able to bypass protection mechanisms that assume the original encoding is also being used by the downstream component.
  • The problem of inconsistent output encodings often arises in web pages. If an encoding is not specified in an HTTP header, web browsers often guess about which encoding is being used. This can open up the browser to subtle XSS attacks.

References