CVE-2021-40797: Neutron Denial of Service Vulnerability
HIGHCVE-2021-40797 is a HIGH (CVSS 6.5) denial of service vulnerability (CWE-772: Missing Release of Resource after Effective Lifetime) affecting Neutron libraries in the PyPI ecosystem. The issue involves openstack neutron denial of service vulnerability. Remediation is available by upgrading affected packages to version 16.4.1, 17.2.1, 18.1.1.
CVE-2021-40797 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2021-40797
To remediate this vulnerability, upgrade all affected Neutron dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install neutron>=16.4.1
pip install neutron>=17.2.1
pip install neutron>=18.1.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show neutron
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2021-40797, inspect your installed packages using pip:
pip show neutron
Analyze the terminal output to locate any version of Neutron in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 16.4.1), your application is affected.
Note: The pip show neutron command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-772: Missing Release of Resource after Effective Lifetime, where the product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed. In Neutron, 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
CVE-2021-40797 Affected Neutron Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
neutron
|
PyPI |
< 16.4.1
|
16.4.1
|
|
neutron
|
PyPI |
≥ 17.0.0
< 17.2.1
|
17.2.1
|
|
neutron
|
PyPI |
≥ 18.0.0
< 18.1.1
|
18.1.1
|
References
Frequently Asked Questions
What is CVE-2021-40797?
Which Neutron versions are affected?
What version fixes CVE-2021-40797?
Is neutron affected?
What is the CVSS score of CVE-2021-40797?
What CWE is associated with CVE-2021-40797?
How can I check PyPI dependencies for CVE-2021-40797?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cpx3-696p-3cw9",
"modified" : "2024-09-25T17:55:07Z",
"published" : "2022-05-24T19:13:19Z",
"aliases" : [ "CVE-2021-40797" ],
"summary" : "OpenStack Neutron Denial of Service vulnerability",
"details" : "An issue was discovered in the routes middleware in OpenStack Neutron before 16.4.1, 17.x before 17.2.1, and 18.x before 18.1.1. By making API requests involving nonexistent controllers, an authenticated user may cause the API worker to consume increasing amounts of memory, resulting in API performance degradation or denial of service.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "neutron"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "16.4.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "neutron"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "17.0.0"
}, {
"fixed" : "17.2.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "neutron"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "18.0.0"
}, {
"fixed" : "18.1.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-40797"
}, {
"type" : "WEB",
"url" : "https://github.com/openstack/neutron/commit/e610a5eb9e71aa2549fb11e2139370d227787da2"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/openstack/neutron"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/neutron/PYSEC-2021-329.yaml"
}, {
"type" : "WEB",
"url" : "https://launchpad.net/bugs/1942179"
}, {
"type" : "WEB",
"url" : "https://security.openstack.org/ossa/OSSA-2021-006.html"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2021/09/09/2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-772" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-02-23T21:39:51Z",
"nvd_published_at" : "2021-09-08T20:15:00Z"
}
}