{"@ID": "942", "@Name": "Permissive Cross-domain Security Policy with Untrusted Domains", "@Abstraction": "Variant", "@Structure": "Simple", "@Status": "Incomplete", "Description": "The product uses a web-client protection\n         mechanism such as a Content Security Policy (CSP) or\n         cross-domain policy file, but the policy includes untrusted\n         domains with which the web client is allowed to\n         communicate.", "Extended_Description": {"xhtml:p": "If a cross-domain policy file includes domains\n            that should not be trusted, such as when using wildcards\n            under a high-level domain, then the application could be\n            attacked by these untrusted domains. In many cases, the\n            attack can be launched without the victim even being aware\n            of it."}, "Related_Weaknesses": {"Related_Weakness": [{"@Nature": "ChildOf", "@CWE_ID": "863", "@View_ID": "1000", "@Ordinal": "Primary"}, {"@Nature": "ChildOf", "@CWE_ID": "923", "@View_ID": "1000"}, {"@Nature": "ChildOf", "@CWE_ID": "183", "@View_ID": "1000"}, {"@Nature": "CanPrecede", "@CWE_ID": "668", "@View_ID": "1000"}]}, "Weakness_Ordinalities": {"Weakness_Ordinality": {"Ordinality": "Primary"}}, "Applicable_Platforms": {"Language": {"@Class": "Not Language-Specific", "@Prevalence": "Undetermined"}, "Technology": [{"@Class": "Web Based", "@Prevalence": "Undetermined"}, {"@Name": "Web Server", "@Prevalence": "Undetermined"}]}, "Background_Details": {"Background_Detail": {"xhtml:p": "In HTTP/HTTPS, policies such as the Same Origin\n              Policy prevent web clients from loading resources from\n              (or making requests to) domains that did not match the\n              web site's own domain, e.g., Javascript or other code\n              hosted on third-party servers. These policies are\n              strictly enforced by browsers and other\n              products. However, these restrictions can be reduced\n              using mechanisms that specify other domains that are\n              allowed to be contacted from the original site, such as\n              Content Security Policy (CSP) or cross-domain policy files\n              (e.g., \"crossdomain.xml\" in Adobe Flash or Reader,\n              \"clientaccesspolicy.xml\" in Silverlight, etc.).  These\n              mechanisms define a list of domains from which a client\n              is allowed to make cross-domain requests. When making a\n              cross-domain request, the client will first look for the\n              policy file on the target server. If it is found, and\n              the domain hosting the application is explicitly allowed\n              to make requests, the request is made."}}, "Modes_Of_Introduction": {"Introduction": [{"Phase": "Implementation"}, {"Phase": "Architecture and Design", "Note": "COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic."}]}, "Common_Consequences": {"Consequence": {"Scope": ["Confidentiality", "Integrity", "Availability", "Access Control"], "Impact": ["Execute Unauthorized Code or Commands", "Bypass Protection Mechanism", "Read Application Data", "Varies by Context"], "Note": "With an overly permissive policy file, an attacker may be able to bypass the web browser's same-origin policy and conduct many of the same attacks seen in Cross-Site Scripting (CWE-79). An attacker can exploit the weakness to transfer private information from the victim's machine to the attacker, manipulate or steal cookies that may include session information, create malicious requests to a web site on behalf of the victim, or execute malicious code on the end user systems. Other damaging attacks include the disclosure of end user files, installation of Trojan horse programs, redirecting the user to some other page or site, running ActiveX controls (under Microsoft Internet Explorer) from sites that a user perceives as trustworthy, and modifying presentation of content."}}, "Detection_Methods": {"Detection_Method": {"@Detection_Method_ID": "DM-14", "Method": "Automated Static Analysis", "Description": "Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect \"sources\" (origins of input) with \"sinks\" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)", "Effectiveness": "High"}}, "Potential_Mitigations": {"Mitigation": [{"Phase": ["Architecture and Design", "Operation"], "Strategy": "Attack Surface Reduction", "Description": "Define a restrictive Content Security Policy [REF-1486] or cross-domain policy file."}, {"Phase": ["Architecture and Design", "Operation"], "Strategy": "Attack Surface Reduction", "Description": "Avoid using wildcards in the CSP / cross-domain policy file. Any domain matching the wildcard expression will be implicitly trusted, and can perform two-way interaction with the target server."}, {"Phase": ["Architecture and Design", "Operation"], "Strategy": "Environment Hardening", "Description": "For Flash, modify crossdomain.xml to use meta-policy options such as 'master-only' or 'none' to reduce the possibility of an attacker planting extraneous cross-domain policy files on a server."}]}, "Demonstrative_Examples": {"Demonstrative_Example": {"@Demonstrative_Example_ID": "DX-208", "Intro_Text": "These cross-domain policy files mean to allow Flash and Silverlight applications hosted on other domains to access its data:", "Body_Text": ["Flash crossdomain.xml :", "Silverlight clientaccesspolicy.xml :", "These entries are far too permissive, allowing any Flash or Silverlight application to send requests. A malicious application hosted on any other web site will be able to send requests on behalf of any user tricked into executing it."], "Example_Code": [{"@Nature": "Bad", "@Language": "XML", "xhtml:div": {"xhtml:br": [null, null, null, null], "#text": "<cross-domain-policy xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"xsi:noNamespaceSchemaLocation=\"http://www.adobe.com/xml/schemas/PolicyFile.xsd\"><allow-access-from domain=\"*.example.com\"/><allow-access-from domain=\"*\"/></cross-domain-policy>"}}, {"@Nature": "Bad", "@Language": "XML", "xhtml:div": {"xhtml:br": [null, null, null, null, null, null, null, null, null, null, null, null], "#text": "<?xml version=\"1.0\" encoding=\"utf-8\"?><access-policy><cross-domain-access><policy><allow-from http-request-headers=\"SOAPAction\"><domain uri=\"*\"/></allow-from><grant-to><resource path=\"/\" include-subpaths=\"true\"/></grant-to></policy></cross-domain-access></access-policy>"}}]}}, "Observed_Examples": {"Observed_Example": [{"Reference": "CVE-2012-2292", "Description": "Product has a Silverlight cross-domain policy that does not restrict access to another application, which allows remote attackers to bypass the Same Origin Policy.", "Link": "https://www.cve.org/CVERecord?id=CVE-2012-2292"}, {"Reference": "CVE-2014-2049", "Description": "The default Flash Cross Domain policies in a product allows remote attackers to access user files.", "Link": "https://www.cve.org/CVERecord?id=CVE-2014-2049"}, {"Reference": "CVE-2007-6243", "Description": "Chain: Adobe Flash Player does not sufficiently restrict the interpretation and usage of cross-domain policy files, which makes it easier for remote attackers to conduct cross-domain and cross-site scripting (XSS) attacks.", "Link": "https://www.cve.org/CVERecord?id=CVE-2007-6243"}, {"Reference": "CVE-2008-4822", "Description": "Chain: Adobe Flash Player and earlier does not properly interpret policy files, which allows remote attackers to bypass a non-root domain policy.", "Link": "https://www.cve.org/CVERecord?id=CVE-2008-4822"}, {"Reference": "CVE-2010-3636", "Description": "Chain: Adobe Flash Player does not properly handle unspecified encodings during the parsing of a cross-domain policy file, which allows remote web servers to bypass intended access restrictions via unknown vectors.", "Link": "https://www.cve.org/CVERecord?id=CVE-2010-3636"}]}, "References": {"Reference": [{"@External_Reference_ID": "REF-1486"}, {"@External_Reference_ID": "REF-943"}, {"@External_Reference_ID": "REF-944"}, {"@External_Reference_ID": "REF-945"}, {"@External_Reference_ID": "REF-946"}, {"@External_Reference_ID": "REF-947"}]}, "Mapping_Notes": {"Usage": "Allowed", "Rationale": "This CWE entry is at the Variant level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.", "Comments": "Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.", "Reasons": {"Reason": {"@Type": "Acceptable-Use"}}}, "Content_History": {"Submission": {"Submission_Name": "CWE Content Team", "Submission_Organization": "MITRE", "Submission_Date": "2014-06-05", "Submission_Version": "2.7", "Submission_ReleaseDate": "2014-06-23", "Submission_Comment": "Created by MITRE with input from members of the CWE-Research mailing list."}, "Modification": [{"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2017-11-08", "Modification_Version": "3.0", "Modification_ReleaseDate": "2017-11-08", "Modification_Comment": "updated Modes_of_Introduction, References, Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2019-06-20", "Modification_Version": "3.3", "Modification_ReleaseDate": "2019-06-20", "Modification_Comment": "updated Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2020-02-24", "Modification_Version": "4.0", "Modification_ReleaseDate": "2020-02-24", "Modification_Comment": "updated Applicable_Platforms, Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2020-06-25", "Modification_Version": "4.1", "Modification_ReleaseDate": "2020-06-25", "Modification_Comment": "updated Description, Name"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2021-10-28", "Modification_Version": "4.6", "Modification_ReleaseDate": "2021-10-28", "Modification_Comment": "updated Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2023-01-31", "Modification_Version": "4.10", "Modification_ReleaseDate": "2023-01-31", "Modification_Comment": "updated Description, Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2023-04-27", "Modification_Version": "4.11", "Modification_ReleaseDate": "2023-04-27", "Modification_Comment": "updated Detection_Factors, References, Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2023-06-29", "Modification_Version": "4.12", "Modification_ReleaseDate": "2023-06-29", "Modification_Comment": "updated Mapping_Notes, Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2024-02-29", "Modification_Version": "4.14", "Modification_ReleaseDate": "2024-02-29", "Modification_Comment": "updated Demonstrative_Examples"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2025-09-09", "Modification_Version": "4.18", "Modification_ReleaseDate": "2025-09-09", "Modification_Comment": "updated Background_Details, Common_Consequences, Description, Name, Potential_Mitigations, References"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2025-12-11", "Modification_Version": "4.19", "Modification_ReleaseDate": "2025-12-11", "Modification_Comment": "updated Applicable_Platforms, Relationships, Weakness_Ordinalities"}], "Contribution": {"@Type": "Content", "Contribution_Name": "Jagjeet Singh", "Contribution_Organization": "Rakuten Kobo Inc.", "Contribution_Date": "2022-08-23", "Contribution_Version": "4.18", "Contribution_ReleaseDate": "2025-09-09", "Contribution_Comment": "Suggested new entry for misconfigured CSP allowing JavaScript, leading to changes in CWE-942 to make it more general"}, "Previous_Entry_Name": [{"@Date": "2020-02-26", "#text": "Overly Permissive Cross-domain Whitelist"}, {"@Date": "2025-09-09", "#text": "Permissive Cross-domain Policy with Untrusted Domains"}]}}
