Flask-CORS allows the `Access-Control-Allow-Private-Network` CORS header to be set to true by default
The Flask-CORS library version 4.0.1 sets the Access-Control-Allow-Private-Network header to true by default without any configuration option. This could allow external websites to access private network resources, leading to data breaches or network intrusions.
corydolphin/flask-cors
Originally disclosed on huntr
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.
From the GitHub Advisory Database (GHSA-hxwh-jpp2-84pm, CC BY 4.0).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
This could expose private network resources to unauthorized external access, leading to data breaches, unauthorized access to sensitive information, and potential network intrusions.
What the attacker needed
Victim visits a malicious website; browser supports private network access
The fix
The library should be changed so that the Access-Control-Allow-Private-Network header is not enabled by default and requires explicit configuration.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
CORS is a browser rule that controls which websites can read responses from another site. A special header, Access-Control-Allow-Private-Network, tells the browser that a public website is allowed to make requests to devices on your local network, like routers or printers. This library turned that permission on by default, so any website could potentially talk to private devices.
What is CORS?
A permissive cross-origin policy lets another site read responses with the user's credentials.