Path Traversal Vulnerability in Wagtail CRX CodeRed Extensions

coderedcms Updated 02 Oct 2025

Summary

22/10/2023
Yes i
Moderate
6.5

CVE-2021-46897: Wagtail CRX CodeRed Extensions vulnerable to Path Traversal. Affects coderedcms versions < 0.22.3. Fixed in 0.22.3. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Wagtail CRX CodeRed Extensions (formerly CodeRed CMS or coderedcms) is an open-source content management system built on top of the Wagtail framework. It provides a user-friendly interface for managing website content and media files. However, an issue has been discovered in versions prior to 0.22.3 that allows for path traversal attacks when serving protected media.

Vulnerability Detail

The vulnerability in Wagtail CRX CodeRed Extensions arises from a lack of proper input validation in the 'views.py' file. Attackers can exploit this by using specially crafted requests to navigate to directories outside of the intended scope, potentially accessing sensitive files or executing arbitrary code. This could lead to unauthorized access, data leakage, or remote code execution.

How To Fix

Latest published version: 6.0.0 as of 22 Oct 2026

pip install --upgrade "coderedcms==6.0.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.22.3

This is the first release that contains the fix.

pip install --upgrade "coderedcms==0.22.3"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to the latest version is not immediately feasible, a temporary workaround can be implemented by implementing additional input validation and sanitization checks in the 'views.py' file. This can help mitigate the risk of path traversal attacks until a proper fix can be applied. Here is an example of how the code can be modified:

# Before
def serve_protected_media(request, path):
    file_path = os.path.join(settings.PROTECTED_MEDIA_ROOT, path)
    # Rest of the code

# After
def serve_protected_media(request, path):
    file_path = os.path.join(settings.PROTECTED_MEDIA_ROOT, os.path.normpath(path))
    # Rest of the code

By using the 'os.path.normpath()' function, the input path is normalized and any attempts at path traversal are effectively neutralized.

Conclusion

The path traversal vulnerability in Wagtail CRX CodeRed Extensions can pose a significant risk to the security of web applications using this package. It is crucial to promptly upgrade to version 0.22.3 or later to mitigate the vulnerability. If you require further assistance or support in addressing this vulnerability, please contact DevNack.com.

See every vulnerability recorded for coderedcms →

Share this vulnerability

FAQ

The path traversal vulnerability in Wagtail CRX CodeRed Extensions can allow attackers to access sensitive files or execute arbitrary code. This can lead to unauthorized access, data leakage, or remote code execution.

No, only versions prior to 0.22.3 are affected. It is recommended to upgrade to the latest version to mitigate the vulnerability.

Yes, a temporary workaround is to implement additional input validation and sanitization checks in the 'views.py' file. However, upgrading to the latest version is the recommended long-term solution.

Yes, the vulnerability has been fixed in version 0.22.3 of Wagtail CRX CodeRed Extensions. It is important to update to this version or later to ensure the security of your application.

You can find more information about this vulnerability, including the technical details and the fix, in the GitHub advisory: [link to GitHub advisory]

How To Fix

Latest published version: 6.0.0 as of 22 Oct 2026

pip install --upgrade "coderedcms==6.0.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.22.3

This is the first release that contains the fix.

pip install --upgrade "coderedcms==0.22.3"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback