Two small XML files sitting in your web root could be granting any website on the internet full access to your users' authenticated sessions. The crossdomain.xml and clientaccesspolicy.xml files were designed to enable legitimate cross-domain communication for Flash and Silverlight applications, but overly permissive configurations remain a serious security risk – even now that those technologies are deprecated.
This article explains what these files do, why they still matter, how attackers exploit them, and how to test and fix your configuration.
Browsers enforce the Same-Origin Policy (SOP) to prevent one website from reading data from another. However, technologies like Adobe Flash and Microsoft Silverlight implemented their own cross-origin models that predated CORS. These technologies relied on XML policy files served from the target domain to determine which external domains could make cross-origin requests.
Flash Player checked for /crossdomain.xml on the target domain before allowing a SWF file from another domain to read data. A permissive example:
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>The wildcard * grants every domain on the internet permission to make authenticated cross-origin requests to your site via Flash. This means any website could load a hidden SWF that reads your users' account pages, API responses, CSRF tokens, and session data.
Silverlight used a similar mechanism with /clientaccesspolicy.xml:
<?xml version="1.0" encoding="utf-8"?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*">
<domain uri="*" />
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true" />
</grant-to>
</policy>
</cross-domain-access>
</access-policy>Silverlight also fell back to reading crossdomain.xml if its own policy file was absent, so a permissive Flash policy affected Silverlight as well.
Flash reached end-of-life in December 2020 and Silverlight in October 2021. Modern browsers no longer support either plugin. So why should you care?
crossdomain.xml, what else has been neglected? Auditors and attackers both use these files as a signal to investigate further.In the era of Flash, the attack was straightforward:
evil.comevil.com (via phishing, malvertising, or a compromised site)target.com/api/account – the victim's cookies for target.com are included automaticallytarget.com/crossdomain.xml, finds allow-access-from domain="*", and permits the SWF to read the responseevil.comThis is effectively a complete bypass of the Same-Origin Policy for any authenticated endpoint on the target domain. Combined with a CSRF token read, the attacker can perform any action the victim can.
Use our Cross-Domain Policy Test tool to instantly check whether your site serves either policy file and whether the configuration is permissive. The tool will:
/crossdomain.xml and /clientaccesspolicy.xmlYou can also check manually with curl:
curl -s https://example.com/crossdomain.xml
curl -s https://example.com/clientaccesspolicy.xmlIf either returns a valid XML policy, evaluate whether it is still needed.
If you no longer need Flash or Silverlight cross-domain access (and you almost certainly do not), delete both files entirely. The server should return a 404 for both URLs.
If you have a legitimate need for a cross-domain policy (extremely rare in 2026), restrict it to only the specific domains that require access:
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="trusted-partner.com" secure="true" />
</cross-domain-policy>Note the secure="true" attribute, which ensures the policy only applies to HTTPS requests.
Serve a policy file that explicitly denies all cross-domain access. This can prevent Silverlight's fallback behavior and makes your security posture explicit:
<?xml version="1.0"?>
<cross-domain-policy>
<site-control permitted-cross-domain-policies="none" />
</cross-domain-policy>WordPress itself does not create cross-domain policy files, but they can appear through:
Check for these files as part of your regular WordPress security hardening process. While you are auditing your WordPress installation, also scan for known plugin vulnerabilities and review your security headers configuration.
Modern cross-origin access is controlled by CORS (Cross-Origin Resource Sharing) headers, which are enforced by the browser natively without any plugin. CORS is a much more granular and secure mechanism:
Access-Control-Allow-Origin: * does not send credentials (cookies) by default, unlike Flash's wildcard which did include cookiesIf you are implementing cross-origin access for a modern application, use CORS headers exclusively. Never create a crossdomain.xml as a workaround for CORS configuration issues.