Skip to content
XSS Write-up Beginner

One payload to XSS them all

A Flash file called sIFR accepted a text parameter that was rendered as HTML, so an attacker could supply a link with a javascript: URL and run script in the page. The same file was hosted on many major sites, so the payload could be used against their visitors.

Abdullah Hussam Follow

Published on ahussam.me

Today, I want to share one of my findings from 2013, which is an XSS vulnerability in a Flash file used by many popular websites. The Flash file was called sIFR (Scalable Inman Flash Replacement).

Abdullah Hussam (@Abdulahhusam), on ahussam.me

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

In 2013 I found an XSS vulnerability in a Flash file that many popular websites were using. The file was sIFR (Scalable Inman Flash Replacement), and the specific version involved here is sIFR2.0.2. sIFR is a technique for rendering styled text in Flash so that a page can use fonts the visitor does not have installed: the Flash movie takes a string of text and a colour, renders it with an embedded font, and the page displays the result in place of ordinary HTML text.

The copy I ran into was hosted on Adobe's image host, at wwwimages.adobe.com, under a path that mirrored www.adobe.com. The movie took the text to render from a txt parameter and the colour from a textcolor parameter.

Before going further: this turned out to be an old bug that already had a CVE. When I first found it I believed I was the first to report it.

Setup

No accounts, roles or special tooling were involved. The starting point was an ordinary browsing session: while I was looking for a bug in Adobe, my browser directed me to the following URL:

HTTP
http://wwwimages.adobe.com/www.adobe.com/lib/com.adobe/sIFR2.0.2/myriad.swf?txt=ADOBE%20PHOTOSHOP%20CS3&textcolor=

In that URL, txt carried simple text (ADOBE PHOTOSHOP CS3) and textcolor accepted an HTML colour code, which was empty in this instance. The movie file itself is myriad.swf.

Finding it

The parameters were the interesting part. txt is a string that the movie renders, and textcolor is a value that is interpreted as an HTML colour. I changed the text ADOBE PHOTOSHOP CS3 to XSS and the page displayed XSS.

Exploitation

Step 1: put an HTML payload in txt

I used the txt parameter to show our text, so I replaced it with an XSS payload:

HTTP
http://wwwimages.adobe.com/www.adobe.com/lib/com.adobe/sIFR2.0.2/myriad.swf?txt=<a href="javascript:alert('Xssed by Abdullah')">xss</a>

The txt value is an anchor element whose href is a javascript: URI that calls alert('Xssed by Abdullah'), with the link text xss. It worked: the payload executed. I had injected my name into the code, marking my beginning with bug bounty.

Step 2: shorten the path to the main host

Looking at the URL, I noticed that the path looked like a file path on www.adobe.com. The movie was being served from wwwimages.adobe.com under a directory that repeated www.adobe.com, so I deleted wwwimages.adobe.com/ from the URL and navigated to:

HTTP
https://www.adobe.com/lib/com.adobe/sIFR2.0.2/myriad.swf?txt=<a href="javascript:alert('Xssed by Abdullah')">xss</a>
xss
xss From the original on ahussam.me

The screenshot from the shortened URL:

Step 3: look for the same movie elsewhere

I reasoned that sIFR2.0.2 might be an Adobe product deployed on other websites, so I started searching for it elsewhere. I found it in use by major companies and government organisations, including Visa, AMEX, Blackberry, Stanford, Harvard and more. Some examples:

xss
xss From the original on ahussam.me
xss
xss
xss
xss
xss
xss

The PoC video:

Or watch on YouTube
From the original on ahussam.me

There are still many other vulnerable websites where this can be found.

Root cause

The movie takes the txt parameter and renders it as HTML instead of treating it as plain text. The textcolor parameter accepted an HTML colour code.

Impact

The payload executed on the Adobe URLs shown above. The same movie was found in use by many other organisations, including Visa, AMEX, Blackberry, Stanford and Harvard. The report does not describe any specific action taken against a user beyond the alert proof of concept, and it does not state what an attacker could reach on any particular site; the practical limit is whatever the hosting origin exposes to script.

Fix

The report does not describe a fix or a change made by Adobe or by any of the other sites.

Variants to test

  1. Other sIFR versions and other .swf files on the same path. Request the movie with a txt value containing an anchor with a javascript: URI. A positive result is the payload executing in the origin of the host serving the file.
  2. The shortened path on the main host. Take a working movie URL on an asset host and remove the asset hostname, keeping the path, as done here with wwwimages.adobe.com/. A positive result is the same movie loading and the same payload executing on the main domain.
  3. Other parameters that are parsed rather than echoed. textcolor accepted an HTML colour code. Supply markup in place of a colour code and check what happens. A positive result is the markup being interpreted rather than rejected or rendered as text.
  4. Third-party deployments of the same movie. Search for the movie filename and version string across other sites, as I did for sIFR2.0.2. A positive result is the movie being served from another organisation's domain and the payload executing in that domain's origin.

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

What happened, in plain words

In 2013 I found a security hole in a small Flash file that lots of well-known websites were using. The file is called sIFR (Scalable Inman Flash Replacement), and the particular copy involved here is version sIFR2.0.2. sIFR is a trick for showing nicely styled text on a web page using a font the visitor may not have installed. A small Flash movie takes a piece of text and a colour, draws the text with a font built into the movie, and the page shows that drawing instead of ordinary HTML text. Think of it like a sign-writing machine: you feed it words and a colour, and it paints a sign for you.

The problem was that the text I supplied was displayed as part of the page, and an HTML payload in it executed. That is the essence of XSS (cross-site scripting): a site takes something a visitor supplies and lets it run as code in the browser instead of showing it as harmless text.

The copy I ran into was hosted on Adobe's image host, wwwimages.adobe.com, under a folder path that repeated www.adobe.com. The movie read the text to draw from a parameter called txt and the colour from a parameter called textcolor.

One thing to get straight before we go on: this turned out to be an old bug that already had a CVE. A CVE is a public catalogue number for a known security flaw, like a reference number on a case file. When I first found it I believed I was the first to report it.

Setup

There were no accounts, no special roles and no special tools. The starting point was an ordinary browsing session. While I was looking for a bug in Adobe, my browser directed me to this URL:

HTTP
http://wwwimages.adobe.com/www.adobe.com/lib/com.adobe/sIFR2.0.2/myriad.swf?txt=ADOBE%20PHOTOSHOP%20CS3&textcolor=

Line by line, in plain words:

  • http:// is the scheme: the browser will fetch this over plain, unencrypted HTTP.
  • wwwimages.adobe.com is the host, the specific server being asked. Here it is an image host belonging to Adobe.
  • /www.adobe.com/lib/com.adobe/sIFR2.0.2/myriad.swf is the path to the file on that server. The file is myriad.swf, a Flash movie (.swf is the file extension for Flash). The folders before it include sIFR2.0.2, which names the version.
  • ? marks the start of the query string, the part of a URL that carries extra values to the page.
  • txt=ADOBE%20PHOTOSHOP%20CS3 is the first parameter. Its name is txt and its value is ADOBE PHOTOSHOP CS3. The %20 is how a space is written inside a URL, because a raw space is not allowed there.
  • & separates one parameter from the next.
  • textcolor= is the second parameter. Its name is textcolor and its value is empty in this instance.

So txt carried simple text and textcolor accepted an HTML colour code. The movie file itself is myriad.swf.

Finding it

The parameters were the interesting part. txt is a string that the movie draws, and textcolor is a value that is read as an HTML colour. A parameter that is treated as HTML rather than as plain text is worth probing, because HTML is the language web pages are written in, and HTML can carry instructions (links, scripts) as well as words. So I changed the text ADOBE PHOTOSHOP CS3 to XSS, and the page displayed XSS.

Exploitation

Step 1: put an HTML payload in txt

I used the txt parameter to show our text, so I replaced it with an XSS payload:

HTTP
http://wwwimages.adobe.com/www.adobe.com/lib/com.adobe/sIFR2.0.2/myriad.swf?txt=<a href="javascript:alert('Xssed by Abdullah')">xss</a>

What each part does:

  • The URL is the same as before, except the txt value is now a piece of HTML instead of a plain phrase.
  • <a ...>xss</a> is an anchor element, the HTML for a link. The words between the opening and closing tags, xss, are the link text the visitor would see.
  • href="..." is the attribute that says where the link goes when clicked.
  • javascript:alert('Xssed by Abdullah') is the destination. A javascript: URI is a special kind of link that runs a snippet of JavaScript instead of opening a page. alert(...) is a built-in browser function that pops up a small dialog box showing the text inside the brackets.
  • So the whole thing says: draw a link labelled xss, and if anyone clicks it, show a popup reading Xssed by Abdullah.

It worked: the payload executed. I had injected my name into the code, marking my beginning with bug bounty.

Step 2: shorten the path to the main host

Looking at the URL, I noticed that the path looked like a file path on www.adobe.com. The movie was being served from wwwimages.adobe.com under a folder that repeated www.adobe.com, so I deleted wwwimages.adobe.com/ from the URL and navigated to:

HTTP
https://www.adobe.com/lib/com.adobe/sIFR2.0.2/myriad.swf?txt=<a href="javascript:alert('Xssed by Abdullah')">xss</a>

What changed, and why it matters:

  • The host is now www.adobe.com, the main Adobe website, instead of the image host wwwimages.adobe.com.
  • The scheme is now https://, the encrypted version of HTTP.
  • The path is the same as before with the leading www.adobe.com/ folder removed, because that folder was only there to mirror the main site's layout on the image host.
  • The txt value is unchanged: the same anchor with the same javascript: URI.
xss
xss From the original on ahussam.me

The screenshot from the shortened URL:

Step 3: look for the same movie elsewhere

I reasoned that sIFR2.0.2 might be an Adobe product deployed on other websites, so I started searching for it elsewhere. The logic is simple: if a company ships a component and other companies copy it onto their own sites, then one bug in the component becomes a bug on every site that copied it. I found it in use by major companies and government organisations, including Visa, AMEX, Blackberry, Stanford, Harvard and more. Some examples:

xss
xss From the original on ahussam.me
xss
xss
xss
xss
xss
xss

The PoC video:

Or watch on YouTube
From the original on ahussam.me

A PoC (proof of concept) is a small demonstration that shows a flaw is real without doing any harm. The PoC video:

There are still many other vulnerable websites where this can be found.

Root cause

The movie takes the txt parameter and renders it as HTML instead of treating it as plain text. The origin is the combination of scheme, host and port that the browser uses to decide what a piece of code is allowed to touch; code from one origin is not supposed to read data from another. The textcolor parameter accepted an HTML colour code. Output encoding is the practice of converting special characters into harmless equivalents before putting them on a page, so that < becomes something the browser shows as a character rather than reads as the start of a tag.

Impact

The payload executed on the Adobe URLs shown above. The same movie was found in use by many other organisations, including Visa, AMEX, Blackberry, Stanford and Harvard. The report does not describe any specific action taken against a user beyond the alert proof of concept, and it does not state what an attacker could reach on any particular site; the practical limit is whatever the hosting origin exposes to script.

Fix

The report does not describe a fix or a change made by Adobe or by any of the other sites.

Variants to test

  1. Other sIFR versions and other .swf files on the same path. Request the movie with a txt value containing an anchor with a javascript: URI. A positive result is the payload executing in the origin of the host serving the file.
  2. The shortened path on the main host. Take a working movie URL on an asset host and remove the asset hostname, keeping the path, as done here with wwwimages.adobe.com/. A positive result is the same movie loading and the same payload executing on the main domain.
  3. Other parameters that are parsed rather than echoed. textcolor accepted an HTML colour code. Supply markup in place of a colour code and check what happens. A positive result is the markup being interpreted rather than rejected or rendered as text.
  4. Third-party deployments of the same movie. Search for the movie filename and version string across other sites, as I did for sIFR2.0.2. A positive result is the movie being served from another organisation's domain and the payload executing in that domain's origin.

Glossary

  • XSS (cross-site scripting): a flaw where a site lets something a visitor supplies run as code in the browser instead of showing it as harmless text.
  • sIFR (Scalable Inman Flash Replacement): a technique for drawing styled text with a font embedded in a Flash movie, so a page can use fonts the visitor does not have installed.
  • Flash / .swf: a browser plugin technology for animated and interactive content; .swf is the file extension for a Flash movie.
  • CVE: a public catalogue number for a known security flaw, like a reference number on a case file.
  • Parameter: a named value passed to a page in the URL, after the ?, written as name=value and separated by &.
  • Query string: the part of a URL after the ? that carries parameters.
  • Host: the specific server named in a URL, such as www.adobe.com.
  • Scheme: the first part of a URL, such as http:// or https://, which says how to fetch the resource.
  • HTML: the language web pages are written in; it carries both words and instructions such as links.
  • Markup: text written in HTML, where tags such as <a> give it structure and behaviour.
  • Anchor element: the HTML for a link, written <a href="...">text</a>.
  • Attribute: a setting inside an HTML tag, such as href on an anchor.
  • javascript: URI: a special kind of link that runs a snippet of JavaScript instead of opening a page.
  • JavaScript: the programming language browsers run to make pages interactive.
  • alert(): a built-in browser function that pops up a small dialog box showing the text you give it.
  • Payload: the piece of code or markup an attacker supplies to trigger a flaw.
  • Escaping / output encoding: converting special characters into harmless equivalents before putting them on a page, so they are shown rather than interpreted.
  • Origin: the combination of scheme, host and port that the browser uses to decide what a piece of code is allowed to touch.
  • PoC (proof of concept): a small demonstration that shows a flaw is real without doing any harm.
  • Reflected: said of a value that a page sends straight back out in its output.

More by Abdullah Hussam

View all

11 more disclosed reports, best first.

More from Adobe

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.