Skip to content
XSS Disclosed report Beginner

Stored XSS on profile page via Steam display name

A user's Steam display name was inserted into a JavaScript string on their profile page without sufficient filtering, allowing a researcher to break out of the script context and achieve stored cross-site scripting. The fix replaces suspicious linked account names with a generic string.

alexbirsan Follow

Originally disclosed on HackerOne

Bounty$1,250incl. $250 bonus High View original
  • Triaged in 27 hours
  • Fixed in 17 days
  • Paid in 8 days
  • Disclosed after 17 days

Summary by the program

The researcher was able to demonstrate a XSS vulnerability by using their Steam nickname as the payload vector. This was due to insufficient filtering on Linked Account name fields. We pushed out an update that replaces suspicious Linked Account names with a generic string in order to prevent future such attacks.

Summary by the researcher

The user's Steam display name was shown on their profile page, inside a javascript string. I added a </script> to my Steam username to break out and achieve XSS. This was fixed by replacing the whole Steam username with a generic string whenever it looks suspicious.

This exploit required buying a Rockstar game on Steam :)

The original report as published on HackerOne, by alexbirsan. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 5 min read.

What the report shows

The target was the Rockstar Games Social Club site at socialclub.rockstargames.com, and the feature involved was the profile page that displays a user's linked Steam account name. The researcher's Steam display name was rendered on that profile page inside a JavaScript string, and the value was not filtered well enough before being placed there.

The researcher changed their Steam username so that it contained a closing script tag, which broke out of the surrounding JavaScript string and allowed script injection. The payload, as described in the report, was:

Text
</script>

Because the display name is pulled from the linked Steam account, the researcher notes that the exploit required buying a Rockstar game on Steam, which is what links a Steam account to the Social Club profile in the first place. The report does not describe the exact request or page flow used to set the name or to trigger the rendering.

The program's summary confirms the mechanism: insufficient filtering on Linked Account name fields allowed the researcher to demonstrate stored XSS using the Steam nickname as the vector. The issue was rated high severity, a bounty of 1,250 USD was paid, and the report was disclosed on 10 November 2017.

The fix, per both summaries, was to replace suspicious Linked Account names with a generic string, so that a name that looks like an attack is no longer rendered as-is. The researcher describes this as replacing the whole Steam username with a generic string whenever it looks suspicious.

Root cause

The report points to insufficient filtering on Linked Account name fields. The Steam display name was inserted into a JavaScript string on the profile page without adequate escaping or validation, so a value containing </script> could terminate the script block and inject markup. The likely root cause is output encoding applied for the wrong context: a value placed inside a script block needs JavaScript-aware escaping (or safe serialisation such as JSON encoding), not HTML escaping alone, and the closing sequence </script> must be neutralised regardless of the surrounding string quoting.

Impact

The report demonstrates stored cross-site scripting on a profile page. The payload lives in the linked account name shown on the profile page. The report does not describe what the researcher did with the execution, whether the payload fired for other users, or any account or session impact. The program treated it as high severity, which reflects the general risk of script execution in the context of an authenticated site.

How this kind of bug works

Stored XSS happens when user-controlled data is saved and later rendered into a page without encoding appropriate to the output context. The classic trap is context confusion: developers escape for HTML text but then place the same value inside a <script> block, an attribute, a URL or a JavaScript string. Inside a script element, the HTML parser looks for the literal sequence </script to end the block, so a value containing it can break out even when it sits inside quotes. Once out, the attacker can add new markup or a new script element.

Defences are context-aware output encoding and safe construction. For data embedded in scripts, serialise it as JSON and escape characters such as <, > and & (or the </ sequence) so the parser cannot see a closing tag; avoid building JavaScript by string concatenation. Apply server-side validation or allow-listing where a field has a known shape, and use Content Security Policy as defence in depth. Stored values should be encoded at render time, not only on input, because the same value may be rendered in several contexts.

How to test for it

  1. Identify fields that are saved and later displayed: display names, nicknames, linked account names, profile bios, organisation names. Linked third-party accounts are interesting because the value often comes from another service and may bypass the target's own input validation.
  2. Find every place the value is rendered and note the context: HTML text, attribute, URL, inline script, JSON blob. View source rather than only the rendered page.
  3. Send a benign marker first, for example a unique string, and confirm it appears unencoded in the response. This distinguishes reflection from storage and shows the exact context.
  4. If the value lands inside a script block, try a closing sequence followed by a marker, then escalate to a full proof only once you see the breakout. If it lands in an attribute, test quote breaking; in a URL, test scheme handling.
  5. Confirm execution in a browser with a harmless payload such as an alert or a DOM write, and check whether it fires for a second account viewing the profile, which proves the stored, cross-user nature.

Common false positives: the value appears encoded in the HTML source but a client-side framework re-inserts it unsafely (check the DOM, not just the response); the payload only executes in your own browser session because of a browser extension; the input is reflected but never stored; or a CSP blocks execution, which still matters but changes severity. Also check whether the field is sanitised on save but rendered raw elsewhere.

How it is fixed

Encode on output for the exact context. For inline scripts, emit JSON with <, > and & escaped, or place data in a data attribute or a separate JSON endpoint fetched by the page. Validate or allow-list fields with a known format, and consider rejecting or neutralising values that contain markup-like sequences. The approach taken here, replacing suspicious names with a generic string, removes the dangerous value. Add a restrictive Content Security Policy and regression tests that render hostile names through every template that displays them.

Hunting notes

This class hides in secondary data: names imported from OAuth providers, SSO and linked accounts, display names shown in admin panels, notification emails rendered as HTML, and profile pages that embed data into JavaScript bootstrapping objects. Recon signals include pages whose source contains inline scripts with user data, JSON blobs embedded in HTML, and features that display third-party account names. Test with a marker first, map every rendering context, and demonstrate cross-user execution with a second account.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

Rockstar Games runs a website called Social Club at socialclub.rockstargames.com. A Social Club profile can be linked to a Steam account, and the profile page then shows the Steam display name, the nickname a person uses on Steam. The researcher found that this name was placed into the profile page's code without being cleaned up properly, and used that to make the page run code of their choosing. This kind of bug is called stored cross-site scripting, or stored XSS.

To understand it, think of a page as a form with printed boxes. The site fills one box with whatever text the user supplied. If the site does not check that text, a user can write something that is not text at all but an instruction, and the page will follow it.

A few everyday terms first. A request is the message your browser sends to a server asking for a page or sending data. A cookie is a small piece of data the site stores in your browser so it can recognise you on the next request, a bit like a wristband at an event. A token is a similar short secret that proves who you are. JavaScript is the programming language browsers run to make pages interactive. A script block is a section of a page marked with <script> and </script> tags; everything between them is treated as JavaScript code, not as visible text.

The researcher's Steam display name was shown on the profile page inside a JavaScript string. A string is just text held by a program, usually written between quotes. The problem: the page did not filter the name well enough before putting it there. The researcher changed their Steam username so that it contained a closing script tag:

Text
</script>

When a browser reads a page, it looks for the literal sequence </script to know where a script block ends. If that sequence appears inside the data, the browser ends the block early, and whatever comes after it is treated as new page markup rather than as harmless text. That is the breakout. The researcher added this sequence to their Steam username to break out of the surrounding JavaScript string and achieve XSS.

Why did this need a purchase? The display name is pulled from the linked Steam account, and the researcher notes that the exploit required buying a Rockstar game on Steam, which is what links a Steam account to the Social Club profile in the first place. The report does not describe the exact request or page flow used to set the name or to trigger the rendering.

The program's own summary confirms the mechanism: insufficient filtering on Linked Account name fields allowed the researcher to demonstrate stored XSS using the Steam nickname as the vector. The issue was rated high severity, a bounty of 1,250 USD was paid, and the report was disclosed on 10 November 2017.

The fix, per both summaries, was to replace suspicious Linked Account names with a generic string, so that a name that looks like an attack is no longer rendered as-is. The researcher describes this as replacing the whole Steam username with a generic string whenever it looks suspicious.

Root cause

The report points to insufficient filtering on Linked Account name fields. The Steam display name was inserted into a JavaScript string on the profile page without adequate escaping or validation, so a value containing </script> could terminate the script block and inject markup. The likely root cause is output encoding applied for the wrong context: a value placed inside a script block needs JavaScript-aware escaping (or safe serialisation such as JSON encoding), not HTML escaping alone, and the closing sequence </script> must be neutralised regardless of the surrounding string quoting.

Impact

The report demonstrates stored cross-site scripting on a profile page. The payload lives in the linked account name shown on the profile page. The report does not describe what the researcher did with the execution, whether the payload fired for other users, or any account or session impact. The program treated it as high severity, which reflects the general risk of script execution in the context of an authenticated site.

In general, how this kind of bug works

Stored XSS happens when user-controlled data is saved and later rendered into a page without encoding appropriate to the output context. The classic trap is context confusion: developers escape for HTML text but then place the same value inside a <script> block, an attribute, a URL or a JavaScript string. Inside a script element, the HTML parser looks for the literal sequence </script to end the block, so a value containing it can break out even when it sits inside quotes. Once out, the attacker can add new markup or a new script element.

Defences are context-aware output encoding and safe construction. For data embedded in scripts, serialise it as JSON and escape characters such as <, > and & (or the </ sequence) so the parser cannot see a closing tag; avoid building JavaScript by string concatenation. Apply server-side validation or allow-listing where a field has a known shape, and use Content Security Policy as defence in depth. Stored values should be encoded at render time, not only on input, because the same value may be rendered in several contexts.

In general, how to test for it

  1. Identify fields that are saved and later displayed: display names, nicknames, linked account names, profile bios, organisation names. Linked third-party accounts are interesting because the value often comes from another service and may bypass the target's own input validation.
  2. Find every place the value is rendered and note the context: HTML text, attribute, URL, inline script, JSON blob. View source rather than only the rendered page.
  3. Send a benign marker first, for example a unique string, and confirm it appears unencoded in the response. This distinguishes reflection from storage and shows the exact context.
  4. If the value lands inside a script block, try a closing sequence followed by a marker, then escalate to a full proof only once you see the breakout. If it lands in an attribute, test quote breaking; in a URL, test scheme handling.
  5. Confirm execution in a browser with a harmless payload such as an alert or a DOM write, and check whether it fires for a second account viewing the profile, which proves the stored, cross-user nature.

Common false positives: the value appears encoded in the HTML source but a client-side framework re-inserts it unsafely (check the DOM, not just the response); the payload only executes in your own browser session because of a browser extension; the input is reflected but never stored; or a CSP blocks execution, which still matters but changes severity. Also check whether the field is sanitised on save but rendered raw elsewhere.

In general, how it is fixed

Encode on output for the exact context. For inline scripts, emit JSON with <, > and & escaped, or place data in a data attribute or a separate JSON endpoint fetched by the page. Validate or allow-list fields with a known format, and consider rejecting or neutralising values that contain markup-like sequences. The approach taken here, replacing suspicious names with a generic string, removes the dangerous value. Add a restrictive Content Security Policy and regression tests that render hostile names through every template that displays them.

In general, hunting notes

This class hides in secondary data: names imported from OAuth providers, SSO and linked accounts, display names shown in admin panels, notification emails rendered as HTML, and profile pages that embed data into JavaScript bootstrapping objects. Recon signals include pages whose source contains inline scripts with user data, JSON blobs embedded in HTML, and features that display third-party account names. Test with a marker first, map every rendering context, and demonstrate cross-user execution with a second account.

Glossary

  • Stored XSS: a bug where text a user saves is later shown to other visitors as active page code instead of plain text.
  • Payload: the piece of input an attacker uses to trigger a bug.
  • Vector: the route or field through which the payload gets in.
  • Request: the message a browser sends to a server to fetch a page or submit data.
  • Cookie: a small value stored in the browser so a site can recognise a returning visitor.
  • Token: a short secret used to prove identity or authorise an action.
  • JavaScript: the language browsers run to make pages interactive.
  • Script block: the part of a page between <script> and </script> tags, treated as code.
  • String: text held by a program, usually between quotes.
  • Filtering: checking or cleaning input before it is used.
  • Escaping / encoding: rewriting special characters so they are treated as text, not as instructions.
  • Output context: where a value ends up on a page (text, attribute, URL, script), which decides how it must be encoded.
  • JSON: a text format for structured data that programs can safely parse.
  • Content Security Policy (CSP): a browser rule set that limits which scripts a page may run.
  • Allow-listing: accepting only values that match a known good pattern.
  • DOM: the browser's live model of the page, which can differ from the raw HTML source.
  • OAuth / SSO: login schemes where one service vouches for your identity to another.
  • Linked account: an outside account, such as Steam, connected to a profile on the site.
  • Reflection: input that comes straight back in a response without being saved.
  • False positive: a finding that looks like a bug but is not exploitable in practice.
  • Regression test: an automated check that a fixed bug stays fixed.

More by alexbirsan

View all

11 more disclosed reports, best first.

More from Rockstar Games

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.