Skip to content
XSS Write-up Intermediate

Interesting case of a DOM XSS in www.figma.com

A DOM-based XSS existed in Figma's community file description field because user input was assigned to innerHTML before being sanitised by DOMPurify. An attacker could inject a simple image tag with an event handler that executed JavaScript, though a strict CSP blocked further exploitation.

Sudhanshu Rajbhar Follow

Published on github.com

Bounty$1,000 View original

History

Sudhanshu Rajbhar (@sudhanshur705), huli (@aszx87410), on github.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

Figma lets users publish a design to the public Community hub, where it is reachable under https://www.figma.com/community/file/*. The publish flow includes a description field that supports basic styling: bold, italic and similar formatting. The researcher was looking at Figma's desktop app, which is built in Electron, hoping that an XSS somewhere could become useful inside the desktop client. The bug turned out to be a DOM XSS on www.figma.com, found in collaboration with @huli.

The interesting part is that the input passes through DOMPurify, so at first sight the feature looks safe. The bypass relies on a browser quirk around innerHTML on a detached element, not on a DOMPurify vulnerability.

Setup

The work targeted the Community publishing feature on www.figma.com. The researcher intercepted the publish request to edit it and used DOMInvader to locate where the sanitisation happens. The DOMPurify version in use was 2.3.1, confirmed from the bundle:

Text
HAm.version
'2.3.1'

and from the licence banner in the same JavaScript file:

Text
dompurify/dist/purify.js:
  (*! @license DOMPurify 2.3.1

The researcher notes that the latest version was 3.0.6, but that there were no known bypasses for 2.3.1.

Finding it

While exploring the publish flow, the researcher noticed that the description editor allowed bold and italic text. Intercepting the submit request showed that the description is sent as raw HTML:

JSON
{
  "name": "Published to Community hub",
  "description": "<p><strong><em>shirley</em></strong></p>"
}

Typing <> directly in the website editor does not help, because the characters are HTML-encoded before they leave the browser:

JSON
{
  "name": "Published to Community hub",
  "description": "<p><strong><em>shirley&lt;img src=x onerror=alert()&gt;</em></strong></p>"
}

Editing the raw request instead and putting the payload straight into the description key sends real tags:

JSON
{
  "name": "Published to Community hub",
  "description": "<p><strong><em>shirley<img src=x onerror=alert()></em></strong></p>"
}

The success response returned the full payload unchanged, which indicated that any sanitisation was happening on the client side only, not on the server. Inspecting the rendered result in Inspect Element showed that the img tag had been removed, so some sanitisation was definitely running.

Exploitation

Step 1: locate the sanitiser

Using DOMInvader, the researcher traced the sanitisation to a minified function in figma_app.min.js:

JavaScript
        let p = document.createElement("div");
        p.innerHTML = e; // [1]
        let f = IFs.map(y=>`:not(${y})`).join("") // [2]
          , g = p.querySelectorAll(f);
        for (let y of g)
            (h = y.parentNode) == null || h.removeChild(y);
        r.current.innerHTML = HAm.default.sanitize(p.innerHTML) // [3]

The variable e holds the value of the description key. On line [1] the user-controlled input is assigned to the innerHTML property of a freshly created div. Because the element has not been added to the document yet, this looked harmless.

Line [2] builds a selector from the IFs array, which acts as a whitelist of allowed tags:

Text
>IFs
(20)['a', 'span', 'sub', 'sup', 'p', 'b', 'i', 'pre', 'code', 'em', 'strike', 'strong', 'h1', 'h2', 'h3', 'ul', 'ol', 'li', 'hr', 'br']

Every element in the detached div that does not match one of those tags is removed. Only after that is the remaining HTML passed to DOMPurify (HAm is the DOMPurify object) and written into the live DOM on line [3].

Step 2: the bypass

With no known DOMPurify bypass available, the researcher considered DOM Clobbering but did not pursue it, and instead brought in huli. After the details were shared, huli reported the next day that JavaScript execution was possible, but that CSP was blocking it. The payload was surprisingly simple:

HTML
<img src=x onerror=alert()>

The observed behaviour is that assigning HTML containing an event handler to the innerHTML of a detached element still executes the handler, a quirk the researcher asks readers to explain. The researcher's own reproduction, to be run in the developer console, is:

JavaScript
 let p = document.createElement("div");
p.innerHTML = "<img src=x onerror=alert()>";

Even though the div is never added to the DOM, the handler fires. This is what defeats the ordering in the vulnerable code: the payload executes at line [1], before the tag whitelist and DOMPurify ever see it.

Step 3: CSP

The team tried to escalate the finding, but the strict CSP blocked every attempt, so the report was submitted without a CSP bypass. The policy was:

Text
script-src 'unsafe-eval' 'nonce-PVEIuETDGJR+8hIA6PqgIQ==' 'strict-dynamic' ;

Root cause

The mistake is the order of operations. User-controlled input is written to innerHTML on line [1] and only sanitised afterwards on line [2] of the vulnerable snippet. The input is written to innerHTML before sanitisation, and browsers still execute event handlers in markup assigned to a detached element. The whitelist filtering and DOMPurify therefore run too late: the payload has already run.

DOMPurify itself was not bypassed. The version was old (2.3.1), but the researcher explicitly notes there were no known bypasses for it, so the version is not the cause.

Impact

The result is DOM XSS on www.figma.com in the Community file publishing flow. In practice the strict CSP prevented the researchers from turning it into a full exploit chain, and the report was accepted without a CSP bypass. The severity was scored as Medium and a bounty of 1,000 USD was awarded. The researcher asked whether Medium was chosen because no CSP bypass was provided, and the Figma team gave an explanation which the researcher agreed with.

Fix

After the fix, the input is sanitised before it is assigned to innerHTML:

JavaScript
        let p = document.createElement("div");
        p.innerHTML = Hum.default.sanitize(e); // [1]
        let f = IFs.map(y=>`:not(${y})`).join("")
          , g = p.querySelectorAll(f);
        for (let y of g)
            (h = y.parentNode) == null || h.removeChild(y);
        r.current.innerHTML = p.innerHTML

For comparison, the vulnerable version was:

JavaScript
       let g = document.createElement("div");
        g.innerHTML = e; // [1]
        let f = nJe.map(v=>`:not(${v})`).join("")
          , b = g.querySelectorAll(f);
        for (let v of b)
            (y = v.parentNode) == null || y.removeChild(v);
        n.current.innerHTML = tAr.default.sanitize(g.innerHTML) // [2]

The fix means the input is sanitised first and only then passed to innerHTML, which the researcher says ensures the same XSS bug cannot be triggered now.

The researcher also points out that the code still modifies the sanitised output afterwards, removing tags that are not in the IFs array. Changing sanitised data can lead to unexpected problems, including XSS, and cites findings by the Sonar Research team on Proton Mail as an example. huli suggested calling sanitize twice so that only safe HTML reaches the DOM even after the tag removal:

JavaScript
        let p = document.createElement("div");
        p.innerHTML = Hum.default.sanitize(e); // [1]
        let f = IFs.map(y=>`:not(${y})`).join("")
          , g = p.querySelectorAll(f);
        for (let y of g)
            (h = y.parentNode) == null || h.removeChild(y);
        r.current.innerHTML = Hum.default.sanitize(p.innerHTML)
  1. Look for any client-side code that assigns user input to innerHTML on a detached element before sanitising it. A positive result is an event handler firing (for example an alert) even though the element was never appended to the document.
  2. Test rich-text fields that are submitted as raw HTML, such as profile descriptions, comments or publishing forms. Intercept the request and replace encoded entities with real tags; a positive result is the server echoing the tags back unchanged in the response.
  3. Check the order of sanitisation in minified bundles by searching for innerHTML assignments near sanitize calls. A positive result is a sanitize call that appears after the assignment rather than before it.
  4. Where a tag whitelist is applied after sanitisation, try payloads that survive the filtering step. A positive result is markup that reaches the live DOM after the whitelist pass.
  5. Test whether the application relies on a detached element being inert. A positive result is script execution from markup assigned to an element that is never inserted into the document.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 17 min read.

What happened, in plain words

Figma is a design tool that runs in your browser. One of its features lets you publish a design to a public gallery called the Community hub, and each published file gets its own page under a web address that starts with https://www.figma.com/community/file/. When you publish, you can add a description, and that description box lets you make text bold or italic, a bit like a very small word processor.

A security researcher was poking around Figma, mostly at the desktop app, which is built with a technology called Electron. Electron lets a company build a desktop program using the same ingredients as a website, so a bug that runs JavaScript inside a web page can sometimes be useful inside the desktop program too. That was the researcher's motivation: find a way to run JavaScript on Figma's site, and see where it leads. The work was done together with another researcher, @huli, who is described as a strong capture-the-flag player. Capture-the-flag, or CTF, is a kind of competition where people solve security puzzles for fun and practice.

The bug they found is called DOM XSS. XSS stands for cross-site scripting, and it means getting your own JavaScript to run inside someone else's website, in the browser of whoever views the page. The DOM is the browser's in-memory model of the page: every heading, paragraph, image and button is an object in that model, and JavaScript can read and change it. DOM XSS means the malicious script gets into the page through the DOM, because the site's own JavaScript takes something a user typed and puts it into the page in a way that lets it run.

The surprising part is that the description goes through DOMPurify, a well-known free library whose whole job is to clean HTML and remove anything dangerous. On the face of it, the feature looked safe. The trick that defeated it was not a flaw in DOMPurify at all. It was an odd behaviour of browsers, a quirk in how they handle a particular instruction, and that is what this story is really about.

The setup: what was tested and with what

The testing targeted the Community publishing feature on www.figma.com. Two tools did most of the work:

  1. An intercepting proxy. A proxy sits between your browser and the website and lets you look at, and change, every request before it is sent. Think of it as a postal worker who lets you open and rewrite a letter before delivering it. This was used to edit the publish request.
  2. DOMInvader. This is a feature built into the developer tools of some browsers that watches the page's JavaScript and tells you where your input ends up, which is how the researcher found where the sanitisation occurs.

The version of DOMPurify in use was 2.3.1. The researcher confirmed this in two ways. First, by asking the library itself, in the browser console:

Text
HAm.version
'2.3.1'

HAm is simply the name the site's code gave to the DOMPurify object after the code was squashed and shortened for delivery to browsers. .version asks that object which version it is, and the answer was '2.3.1'. Second, the same JavaScript file contains the library's licence comment:

Text
dompurify/dist/purify.js:
  (*! @license DOMPurify 2.3.1

That is the standard header the library ships with, naming itself and its version. The researcher notes that the newest version at the time was 3.0.6, so 2.3.1 was old, but also that there were no known ways to bypass 2.3.1.

Finding the interesting field

While exploring the publish flow, the researcher noticed that the description editor allowed bold and italic text. That is interesting because formatting has to be stored somehow, and the usual way is to store it as HTML, the same markup language web pages are written in. If the site stores what you type as HTML and later puts it back into a page, then anything you can sneak into that HTML may end up in the page too.

To see what was actually being sent, the researcher intercepted the submit request. It looked like this:

JSON
{
  "name": "Published to Community hub",
  "description": "<p><strong><em>shirley</em></strong></p>"
}

This is JSON, a simple text format for structured data: curly braces hold a set of named values, each name in quotes, a colon, then the value. Here there are two fields, name and description. The description value is HTML: <p> is a paragraph, <strong> means bold, <em> means italic, and shirley is the text the researcher typed. So the site really does send the description as raw HTML, not as plain text.

The next question is whether you can type HTML tags yourself. The researcher tried typing angle brackets, < and >, directly into the editor on the website. That did not work, because the browser encoded them before sending:

JSON
{
  "name": "Published to Community hub",
  "description": "<p><strong><em>shirley&lt;img src=x onerror=alert()&gt;</em></strong></p>"
}

Look at &lt; and &gt;. Those are HTML entities: special codes that stand for the < and > characters. When a browser shows &lt; on a page, you see a literal < sign, but the browser does not treat it as the start of a tag. This is exactly how a site stops you from typing markup into a plain text box: it turns your angle brackets into entities so they stay harmless text. The editor was doing that encoding for the researcher.

So the researcher went around the editor. Using the proxy, the request was edited by hand, and the payload was placed straight into the description key:

JSON
{
  "name": "Published to Community hub",
  "description": "<p><strong><em>shirley<img src=x onerror=alert()></em></strong></p>"
}

Here the entities are gone and a real <img> tag sits inside the description. An <img> tag normally displays a picture. src=x tells the browser to load the image from a location called x, which does not exist, so the load will fail. onerror=alert() is an event handler: a piece of JavaScript the browser runs when something happens, in this case when the image fails to load. alert() is the simplest possible proof that JavaScript ran, because it pops up a dialog box.

The server's success response came back with the full payload unchanged. That told the researcher something important: the server was not cleaning the input. If any cleaning happened at all, it happened in the browser, after the data came back. That is the client side. The researcher then looked at the published page with Inspect Element, a browser tool that shows the live page structure, and saw that the img tag had been removed. So cleaning was definitely happening somewhere in the browser.

Step 1: finding the code that does the cleaning

This is where DOMInvader came in. It traced the input to a short, squashed function inside a file called figma_app.min.js. The .min.js ending means the file has been minified: all the spaces and line breaks removed and names shortened, to make the file smaller and faster to download. It is the same code a developer wrote, just hard for a human to read.

JavaScript
        let p = document.createElement("div");
        p.innerHTML = e; // [1]
        let f = IFs.map(y=>`:not(${y})`).join("") // [2]
          , g = p.querySelectorAll(f);
        for (let y of g)
            (h = y.parentNode) == null || h.removeChild(y);
        r.current.innerHTML = HAm.default.sanitize(p.innerHTML) // [3]

Line by line, in plain words:

  1. let p = document.createElement("div"); creates a new, empty div element in memory. A div is a generic container, like an empty box. Crucially, this box is not placed on the page. It exists only inside JavaScript, detached from the document.
  2. p.innerHTML = e; puts some HTML inside that box. innerHTML is the property that holds the HTML content of an element. The variable e holds the value of the description key, so this is where the user's text enters the page's code. The comment // [1] marks this line for reference later.
  3. let f = IFs.map(y=>:not(${y})).join("") builds a selector. IFs is a list of allowed tag names. .map(...) turns each name into a piece of text like :not(a), which in CSS selector language means "anything that is not an a tag". .join("") glues all those pieces into one long string. The result is a filter that matches every element except the allowed ones.
  4. , g = p.querySelectorAll(f); finds all elements inside the box that match that filter, that is, all the disallowed ones. querySelectorAll is the browser's search function for finding elements by a pattern.
  5. for (let y of g) starts a loop over each disallowed element.
  6. (h = y.parentNode) == null || h.removeChild(y); removes each one from its parent. parentNode is the element that contains it, and removeChild takes it out. The == null || part is a guard: if there is no parent, do nothing.
  7. r.current.innerHTML = HAm.default.sanitize(p.innerHTML) takes what is left in the box, passes it through DOMPurify (HAm.default.sanitize), and writes the result into the real page, at r.current. The comment // [3] marks this line.

The IFs list is the whitelist of tags the description is allowed to contain. The researcher printed it in the console:

Text
>IFs
(20)['a', 'span', 'sub', 'sup', 'p', 'b', 'i', 'pre', 'code', 'em', 'strike', 'strong', 'h1', 'h2', 'h3', 'ul', 'ol', 'li', 'hr', 'br']

That is 20 tag names: links, spans, subscripts, superscripts, paragraphs, bold, italic, preformatted text, code, emphasis, strikethrough, strong, three heading levels, lists, list items, a horizontal rule and a line break. Anything else, including img, is stripped out by the loop above. Only after that stripping is the remaining HTML cleaned by DOMPurify and placed on the page.

So the order is: put the user's HTML into a detached box, remove disallowed tags, clean with DOMPurify, then show it.

Step 2: the bypass

With no known DOMPurify bypass to use, the researcher thought about DOM Clobbering, a technique where HTML elements are given names that overwrite JavaScript variables, and linked to a public example of it. But the researcher did not feel confident with that technique, so instead asked some CTF players for help. The reasoning was simple: people who solve security puzzles for sport tend to know browser oddities that most developers never meet.

The details were shared with huli. The next day, huli reported that JavaScript execution was possible, but that CSP was blocking it. CSP stands for Content Security Policy. It is a rule the site sends to the browser saying which scripts are allowed to run. If a script does not match the rules, the browser refuses to run it, even if the script got onto the page. So huli had found a way to run code, but the site's rules stopped the code from doing anything useful.

The payload that did it was almost insultingly simple:

HTML
<img src=x onerror=alert()>

This is the same image tag as before: try to load an image from x, fail, and run alert() when the failure happens. The researcher did not believe it at first, because a payload this plain should be removed by any sanitiser worth its name. The explanation is a browser quirk, and the researcher's own reproduction, meant to be pasted into the browser's developer console, is:

JavaScript
 let p = document.createElement("div");
p.innerHTML = "<img src=x onerror=alert()>";

Line by line:

  1. let p = document.createElement("div"); creates a detached div, exactly as the site's code does. It is not on the page.
  2. p.innerHTML = "<img src=x onerror=alert()>"; puts the image tag inside that detached box.

The expectation is that nothing happens, because the box is not on the page. The reality is that the alert() fires anyway. The browser parses the HTML you assign to innerHTML and sets up the image, the image fails to load, and the error handler runs, even though the element was never inserted into the document. The researcher calls it magic, and asks anyone with more detail on the quirk to explain it in the replies.

This is what defeats the site's code. The payload is assigned to innerHTML of the detached box on line [1], and the tag whitelist and DOMPurify run afterwards on line [3]. Cleaning the HTML after it has already executed is like checking a parcel for explosives after you have opened it.

Step 3: the CSP, and why the report went in as it was

The team tried to escalate the finding into something bigger, but the strict CSP blocked every attempt. The policy was:

Text
script-src 'unsafe-eval' 'nonce-PVEIuETDGJR+8hIA6PqgIQ==' 'strict-dynamic' ;

script-src is the part of the policy that governs scripts. 'unsafe-eval' allows a JavaScript function called eval, which runs text as code. 'nonce-...' is a one-time random value: only script tags carrying that exact value are trusted, and the value changes on every page load, so an attacker cannot guess it. 'strict-dynamic' means scripts loaded by an already trusted script are also trusted. The practical effect is that an attacker who can inject a script tag still cannot run it, because they do not know the nonce.

Because of that, the researchers decided to report the bug as it was, without a CSP bypass. Their reasoning was that mature security programmes often accept XSS bugs even when the CSP would stop a real attacker, and they cite Google's vulnerability reward programme as an example.

Root cause

The mistake is the order of operations. The user's input is written to innerHTML on line [1] and only cleaned afterwards, on line [3]. Browsers do not fully behave that way: event handlers in markup assigned to innerHTML of an element outside the document still fire. The whitelist filtering and DOMPurify therefore run too late, after the payload has already executed.

DOMPurify itself was not bypassed. The version was old, 2.3.1, but the researcher explicitly notes there were no known bypasses for it, so the version is not the cause.

Impact

The result is DOM XSS on www.figma.com, in the Community file publishing flow. In practice the strict CSP stopped the researchers from turning it into a full exploit chain, and the report was accepted without a CSP bypass. The severity was scored as Medium and a bounty of 1,000 USD was awarded. The researcher asked whether Medium was chosen because no CSP bypass was provided, and the Figma team gave an explanation which the researcher agreed with. The bug was fixed within a week of triage. Triage is the first stage of a bug report, where the receiving team confirms the bug is real and decides how serious it is.

Fix

After the fix, the input is cleaned before it is assigned to innerHTML:

JavaScript
        let p = document.createElement("div");
        p.innerHTML = Hum.default.sanitize(e); // [1]
        let f = IFs.map(y=>`:not(${y})`).join("")
          , g = p.querySelectorAll(f);
        for (let y of g)
            (h = y.parentNode) == null || h.removeChild(y);
        r.current.innerHTML = p.innerHTML

Line by line:

  1. let p = document.createElement("div"); still creates a detached box.
  2. p.innerHTML = Hum.default.sanitize(e); is the change. The user's input e is now passed through DOMPurify first, and only the cleaned result is put into the box. The payload never reaches innerHTML in a runnable form.
  3. The selector building, the search for disallowed tags and the removal loop are unchanged.
  4. r.current.innerHTML = p.innerHTML writes the result to the page. There is no second cleaning call here, because the input was already cleaned before it entered the box.

For comparison, the vulnerable version was:

JavaScript
       let g = document.createElement("div");
        g.innerHTML = e; // [1]
        let f = nJe.map(v=>`:not(${v})`).join("")
          , b = g.querySelectorAll(f);
        for (let v of b)
            (y = v.parentNode) == null || y.removeChild(v);
        n.current.innerHTML = tAr.default.sanitize(g.innerHTML) // [2]

This is the same logic with different variable names, because minified code renames things. g is the box, e is the user input, nJe is the whitelist, tAr is DOMPurify, and n.current is where the result goes. The important part is the order: g.innerHTML = e on line [1] happens before tAr.default.sanitize(g.innerHTML) on line [2]. The fix swaps that order.

The researcher also points out that the code still modifies the cleaned output afterwards, removing tags that are not in the IFs list. Changing data after it has been cleaned can lead to unexpected problems, including XSS, and the researcher cites findings by the Sonar Research team on Proton Mail as an example. huli suggested calling sanitize twice, so that only safe HTML reaches the page even after the tag removal:

JavaScript
        let p = document.createElement("div");
        p.innerHTML = Hum.default.sanitize(e); // [1]
        let f = IFs.map(y=>`:not(${y})`).join("")
          , g = p.querySelectorAll(f);
        for (let y of g)
            (h = y.parentNode) == null || h.removeChild(y);
        r.current.innerHTML = Hum.default.sanitize(p.innerHTML)

Here the input is cleaned on line [1], the disallowed tags are removed, and then the result is cleaned a second time before being written to the page. The idea is that whatever the tag removal did to the HTML, the second pass catches anything dangerous that came out of it.

If you want to look for similar bugs yourself, these are the directions the researcher lists:

  1. Look for any client-side code that assigns user input to innerHTML on a detached element before cleaning it. A positive result is an event handler firing, for example an alert, even though the element was never added to the document.
  2. Test rich-text fields that are submitted as raw HTML, such as profile descriptions, comments or publishing forms. Intercept the request and replace encoded entities with real tags. A positive result is the server echoing the tags back unchanged in the response.
  3. Check the order of cleaning in minified files by searching for innerHTML assignments near sanitize calls. A positive result is a sanitize call that appears after the assignment rather than before it.
  4. Where a tag whitelist is applied after cleaning, try payloads that survive the filtering step. A positive result is markup that reaches the live page after the whitelist pass.
  5. Test whether the application relies on a detached element being inert. A positive result is script execution from markup assigned to an element that is never inserted into the document.

Glossary

  • XSS (cross-site scripting): getting your own JavaScript to run inside someone else's website, in the browser of whoever views the page.
  • DOM: the browser's in-memory model of a page, where every element is an object that JavaScript can read and change.
  • DOM XSS: XSS where the malicious script enters the page through the site's own JavaScript manipulating the DOM, rather than through the server's response.
  • JavaScript: the programming language that runs in web browsers and makes pages interactive.
  • HTML: the markup language web pages are written in, made of tags such as <p> and <img>.
  • Tag: a piece of HTML markup such as <img> or <p> that tells the browser what kind of element to create.
  • Element: one object in the page, such as a paragraph, an image or a container.
  • div: a generic HTML container element, like an empty box.
  • innerHTML: the property of an element that holds its HTML content; assigning to it makes the browser parse and build the markup.
  • Detached element: an element that exists in JavaScript memory but has not been added to the page.
  • Event handler: a piece of JavaScript that runs when something happens, such as an image failing to load.
  • onerror: the event handler that runs when an element, such as an image, fails to load.
  • alert(): a JavaScript function that pops up a dialog box, commonly used to prove that code ran.
  • Payload: the piece of input an attacker sends to try to trigger a bug.
  • DOMPurify: a free library that cleans HTML by removing dangerous parts.
  • Sanitisation: the process of cleaning input so that anything dangerous is removed.
  • Whitelist: a list of things that are allowed, with everything else rejected.
  • HTML entity: a code such as &lt; that stands for a character such as <, so it displays as text instead of being treated as markup.
  • JSON: a text format for structured data, made of named values in curly braces.
  • Request: the message a browser sends to a server asking for something or submitting data.
  • Response: the message a server sends back.
  • Intercepting proxy: a tool that sits between browser and server and lets you view and change requests and responses.
  • DOMInvader: a browser developer-tools feature that traces where your input ends up in the page's JavaScript.
  • Developer console: a panel in browser developer tools where you can type JavaScript and see messages.
  • Inspect Element: a browser tool that shows the live structure of the page.
  • Minification: squashing code by removing spaces and shortening names to make files smaller.
  • querySelectorAll: a browser function that finds elements matching a pattern.
  • CSS selector: a pattern used to match elements, such as :not(a) meaning anything that is not an a tag.
  • parentNode / removeChild: properties and functions for finding an element's container and taking an element out of it.
  • CSP (Content Security Policy): a rule the site sends to the browser saying which scripts are allowed to run.
  • Nonce: a one-time random value in a CSP that only trusted script tags carry, so injected scripts cannot run.
  • strict-dynamic: a CSP instruction meaning scripts loaded by an already trusted script are also trusted.
  • unsafe-eval: a CSP instruction that allows the eval function to run text as code.
  • DOM Clobbering: a technique where HTML elements are given names that overwrite JavaScript variables.
  • CTF (capture the flag): a security competition where people solve puzzles for practice.
  • Electron: a technology for building desktop programs using web technology.
  • Triage: the first stage of a bug report, where the receiving team confirms the bug and decides how serious it is.
  • Severity: a rating of how serious a bug is, often Low, Medium, High or Critical.
  • Bounty: a reward, usually money, paid for a valid security report.
  • Exploit chain: a series of steps that together turn a small bug into a bigger attack.

More from Figma

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.