CVE-2021-44420: Potential bypass of an upstream access control based on URL paths in Django
7.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.28959%
CWE
Published
12/9/2021
Updated
11/18/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
Django | pip | >= 2.2a1, < 2.2.25 | 2.2.25 |
Django | pip | >= 3.0a1, < 3.1.14 | 3.1.14 |
Django | pip | >= 3.2a1, < 3.2.10 | 3.2.10 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how URL patterns were matched. The commit shows RegexPattern.match() originally used regex.search(), which allows partial matches. For endpoints, it should use fullmatch() with strict anchoring (\Z) to prevent trailing characters. The _route_to_regex function's '$' usage instead of \Z created regex patterns vulnerable to newline bypasses. These two functions directly implement the flawed URL matching logic described in CVE-2021-44420.