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

163 results · Clear filters · Feed

  • Medium 6.1

    EC-CUBE Improper Restriction of Rendered UI Layers or Frames

    Improper restriction of rendered UI layers or frames in EC-CUBE versions from 3.0.0 to 3.0.18 leads to clickjacking attacks. If a user accesses a specially crafted page while logged into the administrative page, unintended operations may be conducted.

  • Medium 4.8

    Improper Restriction of Rendered UI Layers or Frames in Keycloak

    A vulnerability was found in all versions of Keycloak where, the pages on the Admin Console area of the application are completely missing general HTTP security headers in HTTP-responses. This does not directly lead to a security issue, yet it might aid attac…

  • Medium 6.5

    Improper Restriction of Rendered UI Layers or Frames in Apache nifif

    The X-Frame-Options headers were applied inconsistently on some HTTP responses, resulting in duplicate or missing security headers. Some browsers would interpret these results incorrectly, allowing clickjacking attacks. Mitigation: The fix to consistently app…