Cloudanix VulnDB

CVE-2024-6221

High · 7.5

CVSS

7.5

EPSS

0.7%

Published

Aug 18, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A popular web library for handling cross-site requests was accidentally letting outside websites reach internal company systems, so organizations should update it right away to stop that access.

Exploit Available
Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Data Exposure
Component
Library
Class
Misconfiguration
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The library sets the Access-Control-Allow-Private-Network CORS response header to true for all origins by default with no configuration toggle, allowing any external site to issue requests that browsers treat as private-network access.

Why it matters to the business

Private internal services and data become reachable from the public internet through the affected application, increasing the chance of unauthorized data exposure and lateral movement.

How an attack unfolds

An attacker hosts a malicious page on the public internet, causes a victim's browser to load it, and has the page issue a cross-origin fetch against the vulnerable application; because the private-network header is present, the browser permits the request to reach internal resources that would otherwise be blocked.

How to fix it

Upgrade to a version of flask-cors that removes the default private-network header or provides an explicit configuration option to disable it; until a fixed release is available, wrap the CORS middleware and explicitly omit or set the header to false.

How to confirm the fix worked

Inspect HTTP responses from the application for the presence of Access-Control-Allow-Private-Network: true on preflight or actual requests from untrusted origins; confirm the header is absent or configurable after applying remediation.

Typical attack path

  1. Attacker registers a domain and serves a page containing JavaScript that performs a cross-origin request to the target application.
  2. Victim browser visits the attacker's page and the script issues the request.
  3. The application responds with the Access-Control-Allow-Private-Network: true header.
  4. Browser allows the request to reach private network destinations reachable from the server.
  5. Attacker exfiltrates data or performs further actions against internal systems.

How to detect it

Search web-server and application logs for requests that include an Origin header from an external domain followed by responses containing the private-network CORS header; correlate with any subsequent internal resource access attempts that lack normal authentication.

What your security team should do

  • Prioritize upgrade or configuration change for all instances of flask-cors.
  • Add automated header scanning to CI/CD pipelines to detect the private-network header.
  • Review application CORS policies for any other implicit private-network exposure.

The record

A vulnerability in corydolphin/flask-cors version 4.0.1 allows the `Access-Control-Allow-Private-Network` CORS header to be set to true by default, without any configuration option. This behavior can expose private network resources to unauthorized external access, leading to significant security risks such as data breaches, unauthorized access to sensitive information, and potential network intrusions.

Affected packages

Ecosystem Package Introduced Fixed
PyPI flask-cors 0 4.0.2
PyPI flask-cors 0 5.0.0
Chainguard kubeflow-jupyter-web-app 0 1.9.1-r0
Chainguard kubeflow-volumes-web-app 0 1.9.1-r0
Chainguard py3-flask-cors 0 4.0.2-r0
Chainguard py3-supported-flask-cors 0 4.0.2-r0
Chainguard py3.10-flask-cors 0 4.0.2-r0
Chainguard py3.11-flask-cors 0 4.0.2-r0
Chainguard py3.12-flask-cors 0 4.0.2-r0
Chainguard py3.13-flask-cors 0 4.0.2-r0
Debian:11 python-flask-cors 0 No fix
Debian:12 python-flask-cors 0 No fix
Debian:13 python-flask-cors 0 No fix
Mageia:9 python-flask-cors 0 3.0.10-1.1.mga9
Ubuntu:20.04:LTS python-flask-cors 0 No fix
Ubuntu:22.04:LTS python-flask-cors 0 No fix
Ubuntu:22.04:LTS python-flask-cors 0 3.0.9-2ubuntu0.1
Ubuntu:24.04:LTS python-flask-cors 0 No fix
Ubuntu:24.10 python-flask-cors 0 No fix
Ubuntu:Pro:20.04:LTS python-flask-cors 0 3.0.8-2ubuntu0.1+esm1
Ubuntu:Pro:24.04:LTS python-flask-cors 0 4.0.0-1ubuntu0.1~esm1
Wolfi kubeflow-jupyter-web-app 0 1.9.1-r0
Wolfi kubeflow-volumes-web-app 0 1.9.1-r0
Wolfi py3-flask-cors 0 4.0.2-r0
Wolfi py3-supported-flask-cors 0 4.0.2-r0
Wolfi py3.10-flask-cors 0 4.0.2-r0
Wolfi py3.11-flask-cors 0 4.0.2-r0
Wolfi py3.12-flask-cors 0 4.0.2-r0
Wolfi py3.13-flask-cors 0 4.0.2-r0

Related vulnerabilities