What is CWE-1021?
CyStack AIThe web application does not restrict or incorrectly restricts frame objects or UI layers that belong to another application or domain.
CyStack analysis based on the official MITRE CWE source 4.20 (04/30/2026).
The web application does not restrict or incorrectly restricts frame objects or UI layers that belong to another application or domain.
CyStack analysis based on the official MITRE CWE source 4.20 (04/30/2026).
The web application does not restrict or incorrectly restricts frame objects or UI layers that belong to another application or domain.
This weakness occurs when a web application fails to properly constrain or only partially constrains frame objects or UI layers that originate from another application or domain. As a result, an attacker can present or overlay elements from a different context atop the legitimate user interface, potentially deceiving users into performing actions they did not intend. The security impact depends on the functionality of the underlying application and the attacker’s ability to exploit masked or hidden controls within the embedded content.
Abstraction: base level weakness concerning how rendering layers are restricted. Structure: simple, focused on frames, iframes, and UI overlays. Likelihood of exploit: not quantified here. Introduction: primarily during implementation phase. Terminology includes clickjacking, UI redress attack, and tapjacking. Platforms: web based with potential cross-domain implications. Related weakness characteristics: interaction with display primitives and same-origin or cross-origin framing constraints.
Scopes include Access Control. Impacts include gaining privileges or assuming identity, bypassing protection mechanisms, reading application data, and modifying application data. An attacker may trick a user into performing actions that are masked or hidden from view. Impacts vary with the application's functionality, e.g., social media settings changes could be manipulated.
Access Control
Gain Privileges or Assume Identity, Bypass Protection Mechanism, Read Application Data, Modify Application Data
An attacker can trick a user into performing actions that are masked and hidden from the user's view. The impact varies widely, depending on the functionality of the underlying application. For example, in a social media application, clickjacking could be used to trick the user into changing privacy settings.
Implementation: Use X-Frame-Options to restrict how content can be framed and by which domains. Consider support for multiple domains. Implementation: Frame-breaker scripts on pages that should not be framed, with awareness of nested frames. Implementation: Employ Content Security Policy frame-ancestors or frame-src directives to restrict embedded content. Implementation: Restrict rendering within objects, embed, or applet elements.
Automated Static Analysis (SAST) can identify some instances by examining source or binary code to model data flow from sources to sinks. This method is rated as high effectiveness for detecting potential patterns that connect input origins to external destinations.
ObservedExamples include: CVE-2017-7440 where an email preview feature allows clickjacking via a crafted message; CVE-2017-5697 where a hardware or firmware web UI lacks sufficient clickjacking protection; CVE-2017-4015 involving clickjacking in a data loss prevention product via HTTP headers; CVE-2016-2496 tapjacking in a mobile OS permission dialog; CVE-2015-1241 tapjacking in a web browser related to navigation and touch events; CVE-2017-0492 where System UI allows a malicious app to create a full-screen overlay to gain privileges.
These examples illustrate this CWE entry and are not an exhaustive list of related vulnerabilities.
CWE™ Program, operated by The MITRE Corporation. Copyright © 2006–2026, The MITRE Corporation. The MITRE Corporation hereby grants you a non-exclusive, royalty-free license to use CWE for research, development, and commercial purposes. CWE Terms of Use.
CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.
Explore CyStack VulnScan
en