Skip to content
XSS Disclosed report Intermediate

Image Injection/XSS vulnerability affecting https://www.rockstargames.com/newswire/article

An image injection and XSS vulnerability on the Rockstar Games newswire article page allowed an attacker to inject malicious content. When chained with other flaws, this could cause a user's Facebook OAuth tokens to leak via the Referer header.

netfuzzer Follow

Originally disclosed on HackerOne

  • Triaged in 7 hours
  • Fixed in 3 months
  • Paid in 3 days
  • Disclosed after 5 months

Summary by the program

In this report, the researcher demonstrated a method to chain together separate vulnerabilities that, under certain conditions, could cause a user's Facebook Oauth tokens to leak via the Referer header. The specific vulnerability that was addressed in this report was the image injection/XSS component of the attack chain. Specifically, the researcher found an image injection and XSS vulnerability impacting https://rockstargames.com/newswire/article that when combined with other vulnerabilities would cause the behavior described above. We have since fixed multiple components of this attack chain, including an open redirect and the image injection vulnerability initially described in this report.

The original report as published on HackerOne, by netfuzzer. 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. 4 min read.

What the report shows

The target is the Rockstar Games Newswire article page at https://www.rockstargames.com/newswire/article, part of the *.rockstargames.com scope on HackerOne. The researcher, netfuzzer, reported an image injection and cross-site scripting (XSS) vulnerability on that page. The report was disclosed on 24 June 2020 and rated medium severity.

The public summary is written by the program rather than the researcher, and it frames the finding as one link in a longer attack chain. The chain, as the program describes it, could under certain conditions cause a user's Facebook OAuth tokens to leak through the Referer header. The image injection/XSS on the Newswire article page was the component the program addressed in this report. The program states that it has since fixed several parts of the chain, including an open redirect and the image injection vulnerability first described here.

The report does not include the request that triggered the injection, the payload used, the affected parameter, or the server response. It also does not record a bounty amount. What it does establish is that an image injection and XSS affected the Newswire article page, and that the program treated it as one component of a chain that could leak Facebook OAuth tokens via the Referer header.

Root cause

The report names an image injection flaw on the article page but does not describe its cause. Once an attacker can break out of the image context, the same injection point becomes an XSS vector.

The program describes this as a chain, so the image injection alone is the root cause addressed here, while the token leak required the other components.

Impact

The program's own framing is careful: under certain conditions, the chain could cause a user's Facebook OAuth tokens to leak via the Referer header. That means disclosure of OAuth tokens to a third party under certain conditions. The image injection/XSS component is the part of the chain the program addressed in this report.

The report does not give a CVSS score. The severity assigned by the program was medium.

How this kind of bug works

Image injection is a reflection or storage problem in which user input lands inside an image-related attribute or element. Browsers parse image sources leniently, so a value that looks like a URL can still carry characters that terminate the attribute or open a new element. When the application does not encode quotes, angle brackets or scheme separators, an attacker can close the image context and inject an event handler or a script element. The same missing encoding that allows markup injection also allows URL manipulation, which is why image injection and open redirect often appear together.

The Referer leak is a separate mechanism. When a browser navigates from a page to another origin, it normally sends the full URL of the source page in the Referer header unless a referrer policy restricts it. If an OAuth token or code appears in the URL of the page the user is on, and the attacker can cause the browser to request an attacker-controlled resource from that page, the token travels in the header. Modern defences include a strict Referrer-Policy such as no-referrer or same-origin, keeping tokens out of URLs entirely, and content security policy that blocks inline script and unexpected subresource loads.

How to test for it

  1. Map every place where the application renders user-supplied data into an image context: avatar URLs, article thumbnails, Open Graph image tags, and any parameter that ends up in a src attribute.
  2. Send a benign marker value in each candidate parameter and confirm it is reflected or stored in the response inside the image markup.
  3. Replace the marker with values that test context escape: a quote followed by an attribute, an angle bracket followed by an element, and a javascript: or data: scheme. Observe whether the browser parses the result as markup or as a URL.
  4. Check the response headers for Content-Security-Policy and Referrer-Policy, since these determine whether a successful injection actually executes or leaks.
  5. For the leak angle, identify pages that carry tokens or codes in the URL, then look for any injection or redirect that can force a cross-origin request from that page.

A positive result is a payload that the browser executes as script, or a cross-origin request that carries the sensitive URL in Referer. Common false positives are values that are reflected but HTML-encoded, injections that only work in a browser that is not the target's supported set, and reflected markup that is neutralised by CSP. Always confirm execution in a real browser rather than relying on the raw response.

How it is fixed

The standard fix is contextual output encoding: encode quotes, angle brackets and ampersands when placing data into attributes, and validate image URLs against an allowlist of schemes and hosts. A restrictive Content-Security-Policy that disallows inline script and unexpected sources limits the damage of any remaining injection. For the leak component, set a strict Referrer-Policy, avoid putting tokens in URLs, and close open redirects so that attacker-controlled destinations cannot be reached from trusted pages.

Hunting notes

Image injection tends to hide in features that accept a URL from the user: profile pictures, article images, link previews, and social sharing metadata. Recon signals include parameters named for images or URLs, endpoints that echo input into og:image or src attributes, and pages that combine user content with third-party OAuth flows. To make a report land, show the full chain with a clear demonstration of the leak, state the preconditions honestly, and separate the component you are reporting from the components that merely enable it. Programs accept these reports more readily when the impact is concrete and the reproduction is minimal.

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

What happened, in plain words

Rockstar Games runs a news site, the Newswire, where articles are published at https://www.rockstargames.com/newswire/article. A security researcher called netfuzzer found a problem on that article page: an image injection that could be turned into cross-site scripting (XSS). The report was disclosed on 24 June 2020 and rated medium severity.

To understand the finding, start with two everyday ideas. When you open a web page, your browser sends a request to the server, and the server sends back the page. The page is written in HTML, a language of tags such as <img> that tells the browser what to display. An <img> tag has a src attribute, which is the address of the picture to load. Image injection means that something a visitor can influence ends up inside that picture address, or inside the image tag itself, without being cleaned up first. XSS is the next step: if the injected text can break out of the image tag, the attacker can slip in script code, and the browser will run it as if Rockstar had written it.

The program's summary describes the image injection as one link in a longer chain. Chained with other flaws, the program says, the attack could under certain conditions cause a user's Facebook OAuth tokens to leak through the Referer header. Two terms need unpacking here. OAuth is the system that lets you press "Log in with Facebook" on another site: Facebook gives that site a token, a short secret string that proves who you are. The Referer header is a small note your browser attaches to each request saying which page you came from. If a token sits in the address of the page you are on, and the attacker can make your browser request something from their own server, that note can carry the token along with it.

The program states that it has since fixed several parts of the chain, including an open redirect (a link on a trusted site that will forward you to any address an attacker chooses) and the image injection described here. The report does not include the request that triggered the injection, the payload used, the affected parameter, the server response, or a bounty amount. What it does establish is that an image injection and XSS affected the article page, and that the program treated it as one component of a chain that could leak Facebook OAuth tokens via the Referer header.

Why does this matter? Script running on the Rockstar page runs with the trust of that page, which is what makes a small rendering mistake worth reporting.

In general, how this kind of bug works

Image injection is a reflection or storage problem. Reflection means the server echoes your input straight back into the page; storage means it saves your input and shows it to others later. Either way, the input lands inside an image-related attribute or element. Browsers are lenient when reading image addresses, so a value that looks like a URL can still contain characters that end the attribute early or open a new tag. If the application does not encode quotes, angle brackets or scheme separators, an attacker can close the image context and add an event handler or a script element. The same missing encoding that allows markup injection also allows URL manipulation, which is why image injection and open redirect often appear together.

The Referer leak is a separate mechanism. When your browser moves from one page to another site, it normally sends the full address of the source page in the Referer header unless a referrer policy restricts it. If an OAuth token or code appears in the address of the page you are on, and the attacker can cause your browser to request an attacker-controlled resource from that page, the token travels in the header. Modern defences include a strict Referrer-Policy such as no-referrer or same-origin, keeping tokens out of URLs entirely, and a Content-Security-Policy (CSP), a set of rules the server sends telling the browser which scripts and resources are allowed, which blocks inline script and unexpected subresource loads.

How to test for it

  1. Map every place where the application renders user-supplied data into an image context: avatar URLs, article thumbnails, Open Graph image tags (the picture shown when a link is shared), and any parameter that ends up in a src attribute.
  2. Send a harmless marker value in each candidate parameter and confirm it comes back in the response inside the image markup.
  3. Replace the marker with values that test escaping the context: a quote followed by an attribute, an angle bracket followed by an element, and a javascript: or data: scheme. Watch whether the browser treats the result as markup or as an address.
  4. Check the response headers for Content-Security-Policy and Referrer-Policy, since these decide whether a successful injection actually runs or leaks.
  5. For the leak angle, find pages that carry tokens or codes in the address, then look for any injection or redirect that can force a request to another site from that page.

A positive result is a payload the browser executes as script, or a cross-site request that carries the sensitive address in Referer. Common false positives are values that come back but are HTML-encoded, injections that only work in a browser outside the target's supported set, and reflected markup that CSP neutralises. Always confirm execution in a real browser rather than trusting the raw response.

How it is fixed

The standard fix is contextual output encoding: encode quotes, angle brackets and ampersands when placing data into attributes, and validate image addresses against an allowlist of schemes and hosts. A restrictive Content-Security-Policy that disallows inline script and unexpected sources limits the damage of any remaining injection. For the leak part, set a strict Referrer-Policy, avoid putting tokens in URLs, and close open redirects so attacker-chosen destinations cannot be reached from trusted pages.

Hunting notes

Image injection tends to hide in features that accept an address from the user: profile pictures, article images, link previews and social sharing metadata. Recon signals include parameters named for images or URLs, endpoints that echo input into og:image or src attributes, and pages that combine user content with third-party OAuth flows. To make a report land, show the full chain with a clear demonstration of the leak, state the preconditions honestly, and separate the component you are reporting from the components that merely enable it. Programs accept these reports more readily when the impact is concrete and the reproduction is minimal.

Glossary

  • Request: the message your browser sends to a server asking for a page or resource.
  • HTML: the markup language that describes the structure of a web page.
  • Attribute: a setting inside an HTML tag, such as src on an image.
  • Image injection: user-influenced input placed into an image context without proper cleaning.
  • XSS (cross-site scripting): injecting script into a page so the browser runs it as part of that site.
  • OAuth: a system that lets one site log you in through another, such as Facebook, using a token.
  • Token: a secret string that proves your identity to a service.
  • Referer header: a note the browser sends saying which page a request came from.
  • Open redirect: a link on a trusted site that forwards visitors to any address an attacker chooses.
  • Reflection: the server echoing your input straight back into the page.
  • Storage: the server saving your input and showing it to others later.
  • Referrer policy: a rule telling the browser how much of the source address to send in Referer.
  • Content-Security-Policy (CSP): server-sent rules limiting which scripts and resources a page may load.
  • Contextual output encoding: converting characters such as quotes and angle brackets so they display as text instead of being read as markup.
  • Allowlist: a list of values that are explicitly permitted.
  • False positive: a test result that looks like a bug but is not exploitable.

More by netfuzzer

View all

47 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.