meta
Last updated
Last updated
The tag represents metadata that cannot be represented by other HTML meta-related elements.
Some <meta>
tags are informational, for example:
And some affect the page in some way, for example:
Moreover, CSP does not regulate such <meta>
elements. <meta http-equiv=...>
is a tag on the page that may emulate a subset of functions normally reserved for page headers. Similarly, some of these functions appear in Javascript, which is already heavily regulated by CSP. Dangerous functions that can be performed by <meta http-equiv=...>
include:
set-cookie,
refresh:
redirect to any regular URL,
redirect to any data: URL.
set-cookie instruction was removed from the standard, and is no longer supported at all in Firefox 68 and Chrome 65.
We can use the <meta>
tag with content = "0; data: "
URI to execute arbitrary Javascript code (works only on safari), for example:
Firefox and Chrome will block this:
Not allowed to navigate top frame to data URL (Firefox)
Navigation to toplevel data: URI not allowed (Chrome)
Using a similar payload, you can redirect the victim to an malicious page: