flask-cors vulnerable to log injection when the log level is set to debug
corydolphin/flask-cors is vulnerable to log injection when the log level is set to debug. An attacker can inject fake log entries into the log file by sending a specially crafted GET request containing a CRLF sequence in the request path. This vulnerability allows attackers to corrupt log files, potentially covering tracks of other attacks, confusing log post-processing tools, and forging log entries. The issue is due to improper output neutralization for logs.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | flask-cors | < 4.0.1 | 4.0.1 |
References
- https://lists.debian.org/debian-lts-announce/2025/05/msg00049.html
- https://huntr.com/bounties/25a7a0ba-9fa2-4777-acb6-03e5539bb644
- https://github.com/advisories/GHSA-84pr-m4jr-85g5
- https://nvd.nist.gov/vuln/detail/CVE-2024-1681
- https://github.com/corydolphin/flask-cors
- https://github.com/corydolphin/flask-cors/blob/40acc8092332dfed4bb54d7a4f89a6d479466de7/flask_cors/extension.py#L194
- https://github.com/pypa/advisory-database/tree/main/vulns/flask-cors/PYSEC-2024-271.yaml
- CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N- Weakness (CWE)
CWE-117- Platform
- Python (PyPI)
- Package
flask-cors- Disclosed
- 19.04.2024
- Updated
- 11.10.2026 15:17
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2024-271 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-84pr-m4jr-85g5 - CC BY 4.0
Vulnerability history: flask-cors
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 6
- First → latest
- 08.2020 03.2025
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 2
- Medium 4
Disclosures per year
- 2020: 1
- 2021: 0
- 2022: 0
- 2023: 0
- 2024: 2
- 2025: 3
- 2026: 0
-
flask-cors vulnerable to log injection when the log level is set to debug this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.