Cross Origin Resource Sharing Implemented With Restricted Access

Published on 02 Jul 2018
1 min read
Vulnerability

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 in many of the servers. This vulnerability enables the web browser to perform cross-domain request using XMLHTTPRequest L2 API. There are many servers implemented with weak Cross-Origin Resource Sharing policy. The Cross-Origin Resource Sharing or CORS is a mechanism that enables a web browser to perform “cross-domain” requests using the XMLHttpRequest L2 API in a controlled manner. The content is visible via cross-origin resource sharing (CORS) files or headers this can lead 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

This vulnerability can be fixed:-

  • Implement the Cross-Origin Resource Sharing
Rejah Rehim
Written by
Co-founder, Director

Rejah brings more than 12 years of industry experience in Information Technology. He is a fervent security enthusiast and serves as a Project Leader at OWASP Foundation, and Commander (Hon.) at Kerala Police. He has authored two books titled “Effective Python Penetration Testing” and “Python Penetration Testing Cookbook” and is the creator of 9 Mozilla add-ons.

Experience the Beagle Security platform
Unlock one full penetration test and all Advanced plan features free for 14 days
4.8 on G2 • ISO 27001 certified
See How Beagle Security Works
No credit card • No setup required
Launch interactive demo