# Improper Restriction of Rendered UI Layers or Frames (CWE-1021) The web application does not restrict or incorrectly restricts frame objects or UI layers that belong to another application or domain, which can lead to user confusion about which interface the user is interacting with. - Prevalence: Średnia Brak reguł Shoulder - Impact: Wysoki OWASP Top 10 #1 - Prevention: Zobacz MITRE Odnośnik zewnętrzny **OWASP:** Broken Access Control (A01:2021-Broken Access Control) - #1 ## Description A web application is expected to place restrictions on whether it is allowed to be rendered within frames, iframes, or objects. Without these restrictions, the application could be embedded in malicious sites that use clickjacking techniques to trick users into performing unintended actions. ## Prevention ## Consequences - Obejście mechanizmu ochrony - Uzyskanie uprawnień - Modyfikacja danych aplikacji ## Mitigations - Ustaw nagłówek X-Frame-Options na DENY lub SAMEORIGIN - Stosuj dyrektywę frame-ancestors w Content-Security-Policy - Jako rozwiązanie awaryjne wdroż kod JavaScript typu frame-busting