Skip to content
OpenAdvisories

Weakness (CWE)

CWE-1021: Improper Restriction of Rendered UI Layers or Frames

Base Incomplete

The web application does not restrict or incorrectly restricts frame objects or UI layers that belong to another application or domain.

How to prevent it (4 mitigations)
  1. Implementation

    Use the "frame-ancestors" directive in the Content Security Policy, which is intended to define restrictions when it comes to allowing embedded content [REF-1544].

  2. Implementation

    The use of X-Frame-Options (now partially obsolete as of September 2026 [REF-1545]) allows developers of web content to restrict the usage of their application within the form of overlays, frames, or iFrames. The developer can indicate from which domains can frame the content.

    The concept of X-Frame-Options is well documented, but implementation of this protection mechanism is in development to cover gaps; often, there is a need for allowing frames from multiple domains.

  3. Implementation

    Use a "frame-breaker" script in each page that should not be framed. This is very helpful for legacy browsers that do not support the X-Frame-Options security feature previously mentioned (which is now partially obsolete).

  4. Implementation

    In addition to frames or iframes as previously mentioned, the web application is expected to place restrictions on whether it is allowed to be rendered within objects, embed, or applet elements.

Source: MITRE CWE-1021

0 results · Clear filters · Feed

Nothing found.