Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. flask-cors
  4. ›
  5. CVE-2024-1681

CVE-2024-1681: flask-cors vulnerable to log injection when the log level is set to debug

April 19, 2024 (updated June 5, 2026)

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.

References

  • github.com/advisories/GHSA-84pr-m4jr-85g5
  • github.com/corydolphin/flask-cors/blob/40acc8092332dfed4bb54d7a4f89a6d479466de7/flask_cors/extension.py
  • github.com/pypa/advisory-database/tree/main/vulns/flask-cors/PYSEC-2024-271.yaml
  • huntr.com/bounties/25a7a0ba-9fa2-4777-acb6-03e5539bb644
  • lists.debian.org/debian-lts-announce/2025/05/msg00049.html
  • nvd.nist.gov/vuln/detail/CVE-2024-1681

Code Behaviors & Features

Detect and mitigate CVE-2024-1681 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 4.0.1

Fixed versions

  • 4.0.1

Solution

Upgrade to version 4.0.1 or above.

Impact 5.3 MEDIUM

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-117: Improper Output Neutralization for Logs

Source file

pypi/flask-cors/CVE-2024-1681.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:17:15 +0000.