CVE-2021-46897: Wagtail CRX CodeRed Extensions vulnerable to Path Traversal
6.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.34612%
CWE
Published
10/22/2023
Updated
11/9/2023
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| coderedcms | pip | >= 0, < 0.22.3 | 0.22.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the serve_protected_file function in views.py, which handled user-supplied paths without properly resolving and validating absolute paths. The pre-patch code used os.path.join() without checking if the resolved path remained within PROTECTED_MEDIA_ROOT. The fix introduced os.path.abspath() resolution and an explicit startswith() check to ensure subdirectory containment. The GitHub issue #448 and commit diff both explicitly reference this function as the vulnerability location, with the patch adding critical path validation logic.