CVE-2021-40797 is a medium-severity (CVSS 6.5) CWE-772 vulnerability in neutron. 1 public exploit reference exists, so weaponization risk is real. A fix is available for neutron — see the affected versions and patch details below.
OpenStack Neutron Denial of Service vulnerability
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2021-40797 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 383,485 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
neutron🐍neutron🐍neutronReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | neutron | all versions | 16.4.1pip install --upgrade 'neutron==16.4.1' |
| 🐍PyPI | neutron | ≥ 17.0.0&&< 17.2.1 | 17.2.1pip install --upgrade 'neutron==17.2.1' |
| 🐍PyPI | neutron | ≥ 18.0.0&&< 18.1.1 | 18.1.1pip install --upgrade 'neutron==18.1.1' |
Affected Products
neutronopenstackResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for neutron, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update neutron to 16.4.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-40797 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.Source: Red Hat security advisory for CVE-2021-40797 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat OpenStack Platform 16.1 | openstack-neutron-1:15.2.1-1.20220112133420.el8ost | RHSA-2022:0990 |
| Red Hat OpenStack Platform 16.2 | openstack-neutron-1:15.3.5-2.20220113150031.el8ost | RHSA-2022:0996 |
Frequently Asked Questions
Is CVE-2021-40797 in your dependencies?
Find it across PyPI, including transitive dependencies.