Cross-Origin Resource Sharing XML cannot be parsed

OWASP 2013-A5 OWASP 2017-A6 OWASP 2021-A5 OWASP 2019-API7 CWE-94 WASC-14 WSTG-CLNT-07

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). This enables the web browser to perform cross-domain request using XMLHTTPRequest L2 API. This server has XMLHttpRequest API for backward compatibility. This can introduce several security vulnerabilities and fails to validate URLs that are passed to XMLHttpRequest.This will leads to code injection attacks.


Consider a frontend script code for a web application served from uses XMLHttpRequest to make a request for


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:-

  • Allow only selected trusted domains.

Latest Articles