QID 150631
Date Published: 2023-03-08
QID 150631: CORS Arbitrary Origin Trusted
Cross-Origin Resource Sharing (CORS) is an HTTP-header based mechanism that allows a server to indicate any origins (domain, scheme, or port) other than its own from which a browser should permit loading resources. CORS also relies on a mechanism by which browsers make a "preflight" request to the server hosting the cross-origin resource, in order to check that the server will permit the actual request. In that preflight, the browser sends headers that indicate the HTTP method and headers that will be used in the actual request. For security reasons, browsers restrict cross-origin HTTP requests initiated from scripts. The "Access-Control-Allow-Origin" header is used to specify the allowed origins to access the resource.
The WAS scanning engine detects the vulnerability by examining the "Access-Control-Allow-Origin" header for a arbitrary origin reflected value.
If the request is sent to the resource with arbitrary origin and the same origin reflects in the response under "Access-Control-Allow-Origin" header, it indicates that the resource can be accessed from any domain and needs to be strictly configured.
If CORS is misconfigured, it can lead to major security risk like access to sensitive data, API keys and other users' data from any domain. This access could lead to misuse and exploitation of protected resource.
CVEs related to QID 150631
| Advisory ID | Software | Component | Link |
|---|