CWE-942: Permissive Cross-domain Security Policy with Untrusted Domains

Variant Incomplete Simple

CWE版本: 4.18

更新日期: 2025-09-09

弱点描述

The product uses a web-client protection mechanism such as a Content Security Policy (CSP) or cross-domain policy file, but the policy includes untrusted domains with which the web client is allowed to communicate.

常见后果

影响范围: Confidentiality Integrity Availability Access Control

技术影响: Execute Unauthorized Code or Commands Bypass Protection Mechanism Read Application Data Varies by Context

说明: 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.

潜在缓解措施

阶段: Architecture and Design Operation

策略: Attack Surface Reduction

描述: Define a restrictive Content Security Policy [REF-1486] or cross-domain policy file.

阶段: Architecture and Design Operation

策略: Attack Surface Reduction

描述: 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.

阶段: Architecture and Design Operation

策略: Environment Hardening

描述: 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.

检测方法

方法: Automated Static Analysis

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.)

有效性: High

观察示例

参考: CVE-2012-2292

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.

参考: CVE-2014-2049

The default Flash Cross Domain policies in a product allows remote attackers to access user files.

参考: CVE-2007-6243

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.

参考: CVE-2008-4822

Chain: Adobe Flash Player and earlier does not properly interpret policy files, which allows remote attackers to bypass a non-root domain policy.

参考: CVE-2010-3636

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.

引入模式

阶段 说明
Implementation -
Architecture and Design COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic.

适用平台

编程语言
Not Language-Specific (Undetermined)
技术
Web Based (Undetermined)
关键信息

CWE ID: CWE-942

抽象级别: Variant

结构: Simple

状态: Incomplete

相关弱点