CVE Vulnerabilities

CVE-2021-21642

Improper Restriction of XML External Entity Reference

Published: Apr 21, 2021 | Modified: Oct 25, 2023
CVSS 3.x
8.1
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
CVSS 2.x
5.5 MEDIUM
AV:N/AC:L/Au:S/C:P/I:P/A:N
RedHat/V2
RedHat/V3
8.1 IMPORTANT
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Ubuntu

Jenkins Config File Provider Plugin 3.7.0 and earlier does not configure its XML parser to prevent XML external entity (XXE) attacks.

Weakness

The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.

Affected Software

Name Vendor Start Version End Version
Config_file_provider Jenkins * 3.7.0 (including)
Red Hat Migration Toolkit for Containers 1.4 RedHat rhmtc/openshift-migration-controller-rhel8:v1.4.6-4 *
Red Hat Migration Toolkit for Containers 1.4 RedHat rhmtc/openshift-migration-log-reader-rhel8:v1.4.6-4 *
Red Hat Migration Toolkit for Containers 1.4 RedHat rhmtc/openshift-migration-must-gather-rhel8:v1.4.6-4 *
Red Hat Migration Toolkit for Containers 1.4 RedHat rhmtc/openshift-migration-operator-bundle:v1.4.6-5 *
Red Hat Migration Toolkit for Containers 1.4 RedHat rhmtc/openshift-migration-registry-rhel8:v1.4.6-4 *
Red Hat Migration Toolkit for Containers 1.4 RedHat rhmtc/openshift-migration-rsync-transfer-rhel8:v1.4.6-4 *
Red Hat Migration Toolkit for Containers 1.4 RedHat rhmtc/openshift-migration-ui-rhel8:v1.4.6-4 *
Red Hat Migration Toolkit for Containers 1.4 RedHat rhmtc/openshift-migration-velero-plugin-for-aws-rhel8:v1.4.6-4 *
Red Hat Migration Toolkit for Containers 1.4 RedHat rhmtc/openshift-migration-velero-plugin-for-gcp-rhel8:v1.4.6-3 *
Red Hat Migration Toolkit for Containers 1.4 RedHat rhmtc/openshift-migration-velero-plugin-for-microsoft-azure-rhel8:v1.4.6-4 *
Red Hat Migration Toolkit for Containers 1.4 RedHat rhmtc/openshift-migration-velero-restic-restore-helper-rhel8:v1.4.6-5 *
Red Hat Migration Toolkit for Containers 1.4 RedHat rhmtc/openshift-migration-velero-rhel8:v1.4.6-5 *
Red Hat Migration Toolkit for Containers 1.4 RedHat rhmtc/openshift-velero-plugin-rhel8:v1.4.6-4 *
Red Hat OpenShift Container Platform 3.11 RedHat jenkins-2-plugins-0:3.11.1624366838-1.el7 *
Red Hat OpenShift Container Platform 4.5 RedHat jenkins-2-plugins-0:4.5.1623326336-1.el7 *
Red Hat OpenShift Container Platform 4.6 RedHat jenkins-2-plugins-0:4.6.1623162648-1.el8 *
Red Hat OpenShift Container Platform 4.7 RedHat cri-o-0:1.20.2-12.rhaos4.7.git9f7be76.el8 *
Red Hat OpenShift Container Platform 4.7 RedHat cri-tools-0:1.20.0-3.el7 *
Red Hat OpenShift Container Platform 4.7 RedHat jenkins-2-plugins-0:4.7.1621361158-1.el8 *
Red Hat OpenShift Container Platform 4.7 RedHat redhat-release-coreos-0:47.83-2.el8 *

Extended Description

XML documents optionally contain a Document Type Definition (DTD), which, among other features, enables the definition of XML entities. It is possible to define an entity by providing a substitution string in the form of a URI. The XML parser can access the contents of this URI and embed these contents back into the XML document for further processing. By submitting an XML file that defines an external entity with a file:// URI, an attacker can cause the processing application to read the contents of a local file. For example, a URI such as “file:///c:/winnt/win.ini” designates (in Windows) the file C:\Winnt\win.ini, or file:///etc/passwd designates the password file in Unix-based systems. Using URIs with other schemes such as http://, the attacker can force the application to make outgoing requests to servers that the attacker cannot reach directly, which can be used to bypass firewall restrictions or hide the source of attacks such as port scanning. Once the content of the URI is read, it is fed back into the application that is processing the XML. This application may echo back the data (e.g. in an error message), thereby exposing the file contents.

Potential Mitigations

References