Cross Origin Resource Sharing Not Implemented

OWASP 2013-A5 OWASP 2017-A6 CWE-346

Cross-Origin Resource Sharing (CORS) is a mechanism that uses additional HTTP header to let the browser know that an application is running from one domain (Origin) and has permission to access resources from another origin (Server). The Cross-Origin Resource Sharing is not found on many of the servers. This enables the web browser to perform cross-domain request using XMLHTTPRequest L2 API. The lack of Cross-Origin Resource Sharing leads to access to sensitive data.

Example

Consider a frontend script code for a web application served from http://example.beaglesecurity.com uses XMLHttpRequest to make a request for http://api.example.beaglesecurity.com/data.json.

Impact

The major impact includes code injection attacks. Code injection is the exploitation of a computer bug which includes processing invalid data.

Mitigation / Precaution

Beagle recommends the following fixes:-

  • Try to implement the Cross Origin Resource Sharing

Latest Articles