GOPHERSPACE.DE - P H O X Y
gophering on gopher.fnord.one






Internet Engineering Task Force (IETF)                           D. Ross
Request for Comments: 7034                                     Microsoft
Category: Informational                                       T. Gondrom
ISSN: 2070-1721                                           Thames Stanley
                                                            October 2013


                   HTTP Header Field X-Frame-Options

Abstract

   To improve the protection of web applications against clickjacking,
   this document describes the X-Frame-Options HTTP header field, which
   declares a policy, communicated from the server to the client
   browser, regarding whether the browser may display the transmitted
   content in frames that are part of other web pages.

Status of This Memo

   This document is not an Internet Standards Track specification; it is
   published for informational purposes.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Not all documents
   approved by the IESG are a candidate for any level of Internet
   Standard; see Section 2 of RFC 5741.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   http://www.rfc-editor.org/info/rfc7034.

Copyright Notice

   Copyright (c) 2013 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.




Ross & Gondrom                Informational                     [Page 1]

RFC 7034                     X-Frame-Options                October 2013


Table of Contents

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
     1.1.  Requirements Language  . . . . . . . . . . . . . . . . . .  3
   2.  X-Frame-Options Header . . . . . . . . . . . . . . . . . . . .  4
     2.1.  Syntax . . . . . . . . . . . . . . . . . . . . . . . . . .  4
     2.2.  Augmented Backus-Naur Form (ABNF)  . . . . . . . . . . . .  5
       2.2.1.  Examples of X-Frame-Options  . . . . . . . . . . . . .  6
     2.3.  Design Issues  . . . . . . . . . . . . . . . . . . . . . .  6
       2.3.1.  Enable HTML Content from Other Domains . . . . . . . .  6
       2.3.2.  Browser Behavior and Processing  . . . . . . . . . . .  6
         2.3.2.1.  Violation of X-Frame-Options . . . . . . . . . . .  6
         2.3.2.2.  Variation in Current Browser Behavior  . . . . . .  7
         2.3.2.3.  Usage Design Pattern and Example Scenario for
                   the ALLOW-FROM Parameter . . . . . . . . . . . . .  8
         2.3.2.4.  No Caching of the X-Frame-Options Header . . . . .  8
   3.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . .  9
     3.1.  Registration Template  . . . . . . . . . . . . . . . . . .  9
   4.  Security Considerations  . . . . . . . . . . . . . . . . . . .  9
     4.1.  Privacy Considerations . . . . . . . . . . . . . . . . . . 10
   5.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 10
     5.1.  Normative References . . . . . . . . . . . . . . . . . . . 10
     5.2.  Informative References . . . . . . . . . . . . . . . . . . 11
   Appendix A.  Browsers That Support X-Frame-Options . . . . . . . . 13
   Appendix B.  Description of a Clickjacking Attack  . . . . . . . . 13
     B.1.  Shop . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
     B.2.  Online Shop Confirm Purchase Page  . . . . . . . . . . . . 13
     B.3.  Flash Configuration  . . . . . . . . . . . . . . . . . . . 13
   Appendix C.  Acknowledgements  . . . . . . . . . . . . . . . . . . 13






















Ross & Gondrom                Informational                     [Page 2]

RFC 7034                     X-Frame-Options                October 2013


1.  Introduction

   In 2009 and 2010, many browser vendors ([Microsoft-X-Frame-Options],
   [CLICK-DEFENSE-BLOG], and [Mozilla-X-Frame-Options]) introduced the
   use of a non-standard HTTP [RFC2616] header field "X-Frame-Options"
   to protect against clickjacking [Clickjacking].  HTML-based web
   applications can embed or "frame" other web pages.  Clickjacking is a
   type of attack that occurs when an attacker uses multiple transparent
   or opaque layers in the user interface to trick a user into clicking
   on a button or link on another page from server B when they were
   intending to click on the same place of the overlaying page from
   server A.  Thus, the attacker is "hijacking" clicks meant for page A
   and routing them to page B.  The attacker is tricking the user (who
   sees the overlaying user interface content from page A) into clicking
   specific locations on the underlying page from server B, triggering
   some actions on server B and potentially using an existing session
   context in that step.  This is an attack on both the user and on
   server B.  In addition, server A may or may not be the attacker.

   This specification provides informational documentation about the
   current use and definition of the X-Frame-Options HTTP header field.
   As described in Section 2.3.2.2, not all browsers implement
   X-Frame-Options in exactly the same way, which can lead to unintended
   results.  And, given that the "X-" construction is deprecated
   [RFC6648], the X-Frame-Options header field will be replaced in the
   future by the Frame-Options directive in the Content Security Policy
   (CSP) version 1.1 [CSP-1-1].

   A study [FRAME-BUSTING] demonstrated that existing anti-clickjacking
   measures, e.g., frame-breaking JavaScript, have weaknesses that allow
   their protection to be circumvented.

   Short of configuring the browser to disable frames and scripts
   entirely, which massively impairs browser utility, browser users are
   vulnerable to this type of attack.

   The use of "X-Frame-Options" allows a web page from host B to declare
   that its content (for example, a button, links, text, etc.) must not
   be displayed in a frame ( or