Insecure Cross-Origin Resource Sharing Configuration

medium Web Application Scanning Plugin ID 98983

Synopsis

Insecure Cross-Origin Resource Sharing Configuration

Description

Cross Origin Resource Sharing (CORS) is an HTML5 technology which gives modern web browsers the ability to bypass restrictions implemented by the Same Origin Policy.

The Same Origin Policy requires that both the JavaScript and the page are loaded from the same domain in order to allow JavaScript to interact with the page. This in turn prevents malicious JavaScript being executed when loaded from external domains.

The CORS policy allows the application to specify exceptions to the protections implemented by the browser, and enables the developer to specify allowlisted for which external JavaScript is permitted to execute and interact with the page.

An insecure CORS configuration allows any website to trigger requests with user credentials to the target application and read the responses, thus enabling attackers to perform privilegied actions or to retrieve potential sensitive information.

Solution

The application should be configured with an allowlist including only specific and trusted domains to perform CORS requests.

See Also

https://www.w3.org/TR/cors/#security

https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS

Plugin Details

Severity: Medium

ID: 98983

Type: remote

Published: 3/6/2020

Updated: 3/6/2020

Scan Template: api, scan, pci

Risk Information

Risk Factor: Medium

CVSS v2.0

Base Score: 4.3

Vector: AV:N/AC:M/Au:N/C:N/I:P/A:N

CVSS v3.0

Base Score: 6.1

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

Reference Information