Open NetSecRussia opened 7 months ago
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:5678/db. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 409.
Only reading response is prohibited.
127.0.0.1 "POST /db HTTP/1.1" 201 87 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0" 0.000347
Describe the bug There is a CSRF vulnerability in the REST API in firefox. If you run FurDB locally, any site you open in Firefox can create a new database using the REST API.
To Reproduce
furdb --workdir ./furdb serve --port 5678
fetch("http://localhost:5678/db",{method:"post"})
Expected behavior No databases have been created.
Current behavior A new database named "db" has been created.
Reason Firefox does not offer full Cross-Origin Resource Sharing (CORS) protection for POST requests. Link