datatracker.ietf.org
Sign in
Version 5.7.4, 2014-11-12
Report a bug

HTTP Header Field X-Frame-Options
RFC 7034

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

[include full document text]