CVE-2021-3654: Nova Open Redirect Vulnerability

MODERATE
Advisory Identifier: GHSA-vqp6-j452-j6wp
CVSS 6.1
CWE-601
Published
Advisory Summary

CVE-2021-3654 is a MODERATE (CVSS 6.1) open redirect vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Nova libraries in the PyPI ecosystem. The issue involves open redirect in cpython that affects users of openstack nova. Remediation is available by upgrading affected packages to version 21.2.3, 22.2.3, 23.0.3.

CVE-2021-3654 at a Glance

CVE Identifier CVE-2021-3654
GHSA Identifier GHSA-vqp6-j452-j6wp
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product Nova
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2021-3654

To remediate this vulnerability, upgrade all affected Nova dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

nova fixed: 21.2.3
pip install nova>=21.2.3
nova fixed: 22.2.3
pip install nova>=22.2.3
nova fixed: 23.0.3
pip install nova>=23.0.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show nova

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2021-3654, inspect your installed packages using pip:

pip show nova

Analyze the terminal output to locate any version of Nova in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 21.2.3), your application is affected.

Note: The pip show nova command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Nova, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A vulnerability was found in CPython which is used by openstack-nova's console proxy, noVNC. By crafting a malicious URL, noVNC could be made to redirect to any desired URL.

CVE-2021-3654 Affected Nova Versions

3 component(s)
Fixed Versions:
21.2.322.2.323.0.3
Product / Package Ecosystem Affected Versions Fixed Version
nova
PyPI
< 21.2.3
21.2.3
nova
PyPI
≥ 22.0.0
< 22.2.3
22.2.3
nova
PyPI
≥ 23.0.0
< 23.0.3
23.0.3

References

Frequently Asked Questions

What is CVE-2021-3654?
CVE-2021-3654 is a security vulnerability in Nova involving Open Redirect in CPython that affects users of OpenStack Nova under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which Nova versions are affected?
Affected versions include releases prior to 21.2.3, 22.2.3, 23.0.3 across affected packages: nova.
What version fixes CVE-2021-3654?
Upgrading to 21.2.3, 22.2.3, 23.0.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nova affected?
Yes, nova is affected in releases prior to 21.2.3, 22.2.3, 23.0.3. Upgrade your dependency to 21.2.3, 22.2.3, 23.0.3 or later.
What is the CVSS score of CVE-2021-3654?
CVE-2021-3654 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2021-3654?
CVE-2021-3654 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check PyPI dependencies for CVE-2021-3654?
Run the dependency tree command: 'pip show nova'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vqp6-j452-j6wp",
  "modified" : "2022-03-11T22:27:18Z",
  "published" : "2022-03-04T00:00:22Z",
  "aliases" : [ "CVE-2021-3654" ],
  "summary" : "Open Redirect in CPython that affects users of OpenStack Nova",
  "details" : "A vulnerability was found in CPython which is used by openstack-nova's console proxy, noVNC. By crafting a malicious URL, noVNC could be made to redirect to any desired URL.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "nova"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "21.2.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "nova"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "22.0.0"
      }, {
        "fixed" : "22.2.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "nova"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "23.0.0"
      }, {
        "fixed" : "23.0.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-3654"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.launchpad.net/nova/+bug/1927677"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.python.org/issue32084"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1961439"
  }, {
    "type" : "PACKAGE",
    "url" : "https://opendev.org/openstack/nova"
  }, {
    "type" : "WEB",
    "url" : "https://opendev.org/openstack/nova/commit/04d48527b62a35d912f93bc75613a6cca606df66"
  }, {
    "type" : "WEB",
    "url" : "https://opendev.org/openstack/nova/commit/8906552cfc2525a44251d4cf313ece61e57251eb"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/202305-02"
  }, {
    "type" : "WEB",
    "url" : "https://security.openstack.org/ossa/OSSA-2021-002.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.openwall.com/lists/oss-security/2021/07/29/2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-601" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-03-11T22:27:18Z",
    "nvd_published_at" : "2022-03-02T23:15:00Z"
  }
}