CVE-2021-22884

Public on

Last Modified: UTC

Description

A flaw was found in nodejs. A denial of service is possible when the whitelist includes “localhost6”. When “localhost6” is not present in /etc/hosts, it is just an ordinary domain that is resolved via DNS over the network. If the attacker controls the victim's DNS server or can spoof its responses, the DNS rebinding protection can be bypassed by using the “localhost6” domain. As long as the attacker uses the “localhost6” domain, they can still apply the attack described in CVE-2018-7160.

A flaw was found in nodejs. A denial of service is possible when the whitelist includes “localhost6”. When “localhost6” is not present in /etc/hosts, it is just an ordinary domain that is resolved via DNS over the network. If the attacker controls the victim's DNS server or can spoof its responses, the DNS rebinding protection can be bypassed by using the “localhost6” domain. As long as the attacker uses the “localhost6” domain, they can still apply the attack described in CVE-2018-7160.

Statement

Red Hat Enterprise Linux ships with `localhost` and `localhost6` defined in `/etc/hosts`, and thus in general, would not be affected by this flaw, with some specific exceptions, such as : - `/etc/hosts` is disabled or has its default content (including `localhost6`) removed - the inspector is accessed using SSH tunneling from a remote computer that does not have `localhost6` statically defined Red Hat Quay from version 3.4 consumes the nodejs from RHEL, so security tracking is provided by the container health index on the customer portal [1]. Additionally there is no impact from this issue on Quay 3.3 and 3.2 because they don't use the debug option (--inspect) and nodejs is only used at build time [2]. [1] https://catalog.redhat.com/software/containers/quay/quay-rhel8/600e03aadd19c7786c43ae49?container-tabs=security [2] https://issues.redhat.com/browse/PROJQUAY-1409

Red Hat Enterprise Linux ships with localhost and localhost6 defined in /etc/hosts, and thus in general, would not be affected by this flaw, with some specific exceptions, such as :

  • /etc/hosts is disabled or has its default content (including localhost6) removed
  • the inspector is accessed using SSH tunneling from a remote computer that does not have localhost6 statically defined

Red Hat Quay from version 3.4 consumes the nodejs from RHEL, so security tracking is provided by the container health index on the customer portal [1]. Additionally there is no impact from this issue on Quay 3.3 and 3.2 because they don't use the debug option (--inspect) and nodejs is only used at build time [2]. [1] https://catalog.redhat.com/software/containers/quay/quay-rhel8/600e03aadd19c7786c43ae49?container-tabs=security [2] https://issues.redhat.com/browse/PROJQUAY-1409

Mitigation

Ensure that 'localhost6' is part of /etc/hosts.
e.g.:

$ grep localhost6 /etc/hosts
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

Additional information

  • Bugzilla 1932024: nodejs: DNS rebinding in --inspect
  • CWE-20: Improper Input Validation
  • FAQ: Frequently asked questions about CVE-2021-22884

Common Vulnerability Scoring System (CVSS) Score Details

Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

CVSS v3 Score Breakdown
Red HatNVD

CVSS v3 Base Score

7.5

7.5

Attack Vector

Network

Network

Attack Complexity

High

High

Privileges Required

None

None

User Interaction

Required

Required

Scope

Unchanged

Unchanged

Confidentiality Impact

High

High

Integrity Impact

High

High

Availability Impact

High

High

CVSS v3 Vector

Red Hat: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

NVD: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

Red Hat CVSS v3 Score Explanation

Red Hat considers the Attack Complexity to be High, as the attacker needs to control the responses to the victim's DNS requests in order to momentarily redirect the "localhost6" request to an attacker owned IP address.

Red Hat considers the Attack Complexity to be High, as the attacker needs to control the responses to the victim's DNS requests in order to momentarily redirect the "localhost6" request to an attacker owned IP address.

Understanding the Weakness (CWE)

CWE-20

Availability

Technical Impact: DoS: Crash, Exit, or Restart; DoS: Resource Consumption (CPU); DoS: Resource Consumption (Memory)

An attacker could provide unexpected values and cause a program crash or excessive consumption of resources, such as memory and CPU.

Confidentiality

Technical Impact: Read Memory; Read Files or Directories

An attacker could read confidential data if they are able to control resource references.

Integrity,Confidentiality,Availability

Technical Impact: Modify Memory; Execute Unauthorized Code or Commands

An attacker could use malicious input to modify data or possibly alter control flow in unexpected ways, including arbitrary command execution.

Frequently Asked Questions

Why is Red Hat's CVSS v3 score or Impact different from other vendors?

My product is listed as "Under investigation" or "Affected", when will Red Hat release a fix for this vulnerability?

What can I do if my product is listed as "Will not fix"?

What can I do if my product is listed as "Fix deferred"?

What is a mitigation?

I have a Red Hat product but it is not in the above list, is it affected?

Why is my security scanner reporting my product as vulnerable to this vulnerability even though my product version is fixed or not affected?

Want to get errata notifications? Sign up here.