Reflected xss
A reflected cross-site scripting flaw existed in a landing page URL parameter, allowing an attacker to inject script into the page. An attacker could craft a link that executes arbitrary JavaScript in a victim's browser.
- Triaged in 19 days
- Fixed in 2 months
- Paid in 21 days
- Disclosed after 3 months
Summary by the program
Summary
RXSS in https://mackeeperapp.mackeeper.com/
Steps to reproduce
https://mackeeperapp.mackeeper.com/landings/123.14/?affid=zzb_984.627163.1529211599.31.zzbxxxxxxxxxx'"><>&utm_source=http%3A%2F%2Fweb.archive.org%2Fcache%2Fhttps%3A%2F%2Fassets.kromtech.net%2Flnd%3Fback%3DaHR0cDovL3J6Lm1hY2tlZXBlci5jb20vcGFyYW1zcyUzRHBoZXhhZmM5YThkOWI2YTVkM2U2OTI5ODlmYWJhMjljZGZlOGNiOTBiMWY0ZGJjNmMxYTg5YTkzYTA5Y2UyZDM5ZWEwOWJlYmNkOWNkN2QyOTglMjZ0cnQlM0QyOV81MjM1MSZyZXFpZD0zNTZiNjdhNmQ0MWIwM2JhNzVkNWMxMTljZjY1MDJhYg%253D%253D%26reqid%3D356b67a6d41b03ba75d5c119cf6502ab%26sign%3D6bb6d93cbefff15fa197a7fb33becd3bf2024590xxxxxxxxxx'"><>&utm_medium=zzb_3329xxxxxxxxxx'"><>&utm_campaign=rdxxxxxxxxxx'"><>&utm_term=xxxxxxxxxx'"><>&utm_content=rdxxxxxxxxxx'"><>&userDefiner=zzb_3329xxxxxxxxxx'"><>&epayId=29xxxxxxxxxx'"><>&landId=844&installer=rd&trt=29_52351&guid=48941b21-71eb-11e8-84e9-0e846d25c658xxxxxxxxxx'"><>&reqid=356b67a6d41b03ba75d5c119cf6502abxxxxxxxxxx");%0aalert(1);//%0a</script><script>alert(1)</script>
Context
Clario ran a bug bounty program on HackerOne, and this report concerns the host mackeeperapp.mackeeper.com, which falls under the in-scope asset *.mackeeper.com. The affected feature is a landing page path under /landings/, which takes a numeric landing identifier and a long set of marketing and tracking parameters: affid, utm_source, utm_medium, utm_campaign, utm_term, utm_content, userDefiner, epayId, landId, installer, trt, guid and reqid. These parameters normally carry affiliate identifiers, campaign attribution data and request identifiers so that the landing page can record where a visitor came from.
The weakness is a reflected cross-site scripting (XSS) issue, rated low severity, and the report was disclosed on 17 May 2020 with a bounty of 50.00 USD.
Setup
No accounts, roles, tools or software versions are described. The finding is reachable with an unauthenticated request to a public landing page URL, so the only precondition is the ability to get a victim to open a crafted link.
Finding it
The report gives a single reproduction URL with payloads in the query string, but no response showing the reflection. The summary the program published is short: it names the host and gives a single reproduction URL. The reasoning that led to the parameter choice is not documented in the report.
Exploitation
Step 1: Request the crafted landing page URL
The whole exploit is a single GET request. The payload is embedded in several of the tracking parameters, each of which ends with the same breakout sequence, and the final parameter carries a script injection.
https://mackeeperapp.mackeeper.com/landings/123.14/?affid=zzb_984.627163.1529211599.31.zzbxxxxxxxxxx'"><>&utm_source=http%3A%2F%2Fweb.archive.org%2Fcache%2Fhttps%3A%2F%2Fassets.kromtech.net%2Flnd%3Fback%[redacted]%253D%253D%26reqid%[redacted]%26sign%[redacted]'"><>&utm_medium=zzb_3329xxxxxxxxxx'"><>&utm_campaign=rdxxxxxxxxxx'"><>&utm_term=xxxxxxxxxx'"><>&utm_content=rdxxxxxxxxxx'"><>&userDefiner=zzb_3329xxxxxxxxxx'"><>&epayId=29xxxxxxxxxx'"><>&landId=844&installer=rd&trt=29_52351&guid=48941b21-71eb-11e8-84e9-0e846d25c658xxxxxxxxxx'"><>&reqid=[redacted]");%0aalert(1);//%0a</script><script>alert(1)</script>
The important parts are:
- The path
/landings/123.14/selects the landing page that performs the reflection. - Every tracking parameter value ends with
'"><>, a sequence that closes a single-quoted string, a double-quoted attribute and a tag, so that whatever context the value lands in, the markup is broken out of. - The
reqidparameter ends with");%0aalert(1);//%0a</script><script>alert(1)</script>. The");closes a quoted string and a call,%0ais a newline,alert(1)is the proof,//comments out the remainder of the line, and</script><script>alert(1)</script>provides a second, independent execution path in case the value is reflected inside a script block rather than HTML. - The
utm_sourcevalue is a URL-encoded reference to a web archive cache of anassets.kromtech.netlanding URL, which is consistent with the parameter normally holding a referrer-style URL.
The report does not include the server response, so the exact reflection point and the resulting markup are not shown. The construction of the payload, with breakouts for both an attribute context and a script context, indicates that the value is reflected into the page in one of those positions.
Root cause
The landing page takes query string values and writes them into the HTML response without context-aware output encoding. Because the payload includes both HTML breakouts ('"><>) and a JavaScript breakout (");), the reflection is likely happening inside an inline script or an attribute that is later interpreted as script, rather than in plain text content. The report does not identify the specific template, framework or line of code responsible, and it does not describe any input filtering or output encoding that was present and failed. The landId=844 value in the URL is a plain number and is not part of the injection.
Impact
An attacker who can persuade a victim to open the crafted URL runs JavaScript in the origin of mackeeperapp.mackeeper.com. The report does not state what data or actions are reachable from that origin, so the practical consequences beyond script execution in the site's context are not documented. The program rated the issue low severity, which is consistent with a reflected XSS that requires user interaction and has no described path to sensitive data or privileged actions.
Fix
The appropriate remediation is to encode every reflected query parameter according to the context it is written into: HTML entity encoding for element and attribute contexts, JavaScript string escaping for values placed inside scripts, and avoiding inline script construction from request data altogether. Server-side validation that restricts tracking parameters to their expected character sets (for example, identifiers and URLs) would also reduce the attack surface.
Variants to test
- Apply the same breakout sequence to each tracking parameter individually rather than all at once, to find which ones are reflected and in which context. A positive result is an
alertfiring from a single parameter. - Try the HTML-only breakout
'"><>without the script portion, to see whether the reflection is in markup. A positive result is injected markup appearing in the rendered page. - Try the script-only breakout
");alert(1);//without the HTML portion, to see whether the reflection is inside an inline script. A positive result is execution without any tag injection. - Test the numeric path segment (
/landings/123.14/) and the numeric parameters (landId,epayId,trt) for reflection, since these may be handled differently from the string parameters. A positive result is any of them appearing unencoded in the response. - Test the same parameter names on other hosts under the same wildcard scope. A positive result is the same reflection behaviour on a sibling host.
Hunting notes
Landing pages and affiliate tracking endpoints are a good place to look for reflected XSS because they accept many free-form parameters for attribution and are often built from templates that interpolate request data directly. During recon, look for hosts under a wildcard scope that serve marketing paths such as /landings/, and for parameters like utm_*, affid, guid and reqid that are echoed back into the page. A quick signal is a unique marker string appearing verbatim in the response body; from there, determine the surrounding context and choose the matching breakout. The report shows the value of a payload that covers several contexts at once, so that a single request demonstrates execution regardless of where the value lands. The report gives only a reproduction URL, with no described impact chain, which is typical for low-severity reflected XSS.
What happened, in plain words
A security researcher found a bug on a website run by Clario, a company that makes Mac cleaning and security software. The bug was in a marketing landing page, the kind of page you land on after clicking an advert or an affiliate link. That page took pieces of text from the web address (the URL) that a visitor typed or clicked, and pasted them straight into the page it sent back, without cleaning them first. Because of that, someone could craft a special link that, when opened, made the page run a small piece of JavaScript of the attacker's choosing. This kind of bug is called reflected cross-site scripting, or reflected XSS.
The researcher reported it through HackerOne, a platform where companies publish bug bounty programmes and researchers submit findings. The programme was Clario's, the affected host was mackeeperapp.mackeeper.com, which sits under the in-scope asset *.mackeeper.com, and the report was rated low severity. It was disclosed on 17 May 2020 and paid a bounty of 50.00 USD.
This article walks through the report from the beginning, explaining every idea as it comes up, so you can follow it even if you have never looked at a security report before.
Context
The programme and the asset
A bug bounty programme is an arrangement where a company says: if you find a security problem in our systems and tell us privately, we will pay you a reward (the bounty) and, usually after a fix, we may publish your report. HackerOne is one of the platforms that hosts these programmes.
When a programme is set up, it lists its scope: the set of systems a researcher is allowed to test. Here the scope entry is written as *.mackeeper.com. The asterisk is a wildcard, meaning "any subdomain". So mackeeperapp.mackeeper.com is covered, as would be shop.mackeeper.com or blog.mackeeper.com. Testing outside the scope is not allowed, which is why the exact host matters.
The feature: a landing page
A landing page is the page a marketing campaign sends you to. Companies that sell software often run affiliate programmes: independent marketers (affiliates) drive visitors to the company's site and get paid for the resulting sales or installs. To know who sent which visitor, the links are stuffed with tracking parameters, extra pieces of information appended to the URL after a question mark.
You have seen this yourself. A URL like https://example.com/page?colour=red&size=large has two parameters: colour with value red, and size with value large. The part before the ? is the path, the part after is the query string, and each name=value pair is separated by &.
The affected feature is a path under /landings/ that takes a numeric landing identifier and a long list of marketing and tracking parameters:
affid: an affiliate identifier, telling the site which affiliate sent the visitor.utm_source,utm_medium,utm_campaign,utm_term,utm_content: the standard "UTM" parameters used across the web for campaign attribution. They record where a visit came from: which site, which channel (email, advert, social), which campaign, which keyword, which specific advert.userDefiner: a parameter whose purpose the report does not explain.epayId: an identifier whose purpose the report does not explain.landId: a landing page identifier.installer: a marker for which installer variant to use.guid: a globally unique identifier, a long random-looking string used to tell one visitor or session apart from another.reqid: a request identifier, a label attached to a single request so it can be traced in logs.
These parameters normally carry affiliate identifiers, campaign attribution data and request identifiers, so that the landing page can record where a visitor came from.
The weakness
Reflected cross-site scripting is easiest to understand with a comparison. Imagine a receptionist who reads out whatever name a visitor gives and writes it on a badge, without checking it. If someone says their name is "Bob, and by the way the building is on fire", the receptionist writes that whole sentence on the badge, and everyone who reads the badge sees the fake alarm. The receptionist did not mean to spread the message; they simply copied input into output.
A web page does the same thing when it takes a value from the URL and writes it into the HTML it sends back without encoding it. Encoding means converting characters that have a special meaning in HTML (like <, > and quotes) into harmless equivalents, so the browser displays them as text instead of treating them as instructions. When encoding is missing, the browser cannot tell the difference between text the site meant to show and text an attacker supplied, so it follows the attacker's instructions.
"Reflected" means the value is not stored on the server. It goes in with one request and comes straight back in the response to that same request. That is why the attacker needs the victim to open a crafted link: the payload only exists in that link.
Setup
The report describes no accounts, roles, tools or software versions. The finding is reachable with an unauthenticated request to a public landing page URL. "Unauthenticated" means no login is needed: anyone on the internet can open the page. The only precondition is the ability to get a victim to open a crafted link, for example by sending it in a message or posting it somewhere.
Finding it
The report gives a single reproduction URL with payloads in the query string, but no response showing the reflection. In other words, values placed in the URL end up in the page's HTML, and the page does not neutralise the dangerous characters in them.
The summary the programme published is short: it names the host and gives a single reproduction URL. The reasoning that led to the parameter choice is not documented in the report, so we do not know which parameter the researcher tried first or how many attempts it took.
Exploitation
Step 1: Request the crafted landing page URL
The whole exploit is a single GET request. A GET request is the ordinary kind of request a browser makes when you open a link or type an address: it asks the server to send back a page. The payload is embedded in several of the tracking parameters, each of which ends with the same breakout sequence, and the final parameter carries a script injection.
https://mackeeperapp.mackeeper.com/landings/123.14/?affid=zzb_984.627163.1529211599.31.zzbxxxxxxxxxx'"><>&utm_source=http%3A%2F%2Fweb.archive.org%2Fcache%2Fhttps%3A%2F%2Fassets.kromtech.net%2Flnd%3Fback%[redacted]%253D%253D%26reqid%[redacted]%26sign%[redacted]'"><>&utm_medium=zzb_3329xxxxxxxxxx'"><>&utm_campaign=rdxxxxxxxxxx'"><>&utm_term=xxxxxxxxxx'"><>&utm_content=rdxxxxxxxxxx'"><>&userDefiner=zzb_3329xxxxxxxxxx'"><>&epayId=29xxxxxxxxxx'"><>&landId=844&installer=rd&trt=29_52351&guid=48941b21-71eb-11e8-84e9-0e846d25c658xxxxxxxxxx'"><>&reqid=[redacted]");%0aalert(1);//%0a</script><script>alert(1)</script>
Line by line, in plain words:
https://mackeeperapp.mackeeper.comis the host, the server the request goes to.httpsmeans the connection is encrypted./landings/123.14/is the path. It selects the landing page that performs the reflection.?starts the query string, and every&after it separates one parameter from the next.affid=zzb_984.627163.1529211599.31.zzbxxxxxxxxxx'"><>sets the affiliate identifier. Thexxxxxxxxxxmarks a value that has been redacted, that is, hidden before publication. The interesting part is the tail:'"><>.utm_source=holds a long URL-encoded address. URL encoding is how a URL carries characters that would otherwise be ambiguous:%3Ais a colon,%2Fis a slash,%3Dis an equals sign, and%25is a percent sign itself. Decoded, this value points at a web archive cache of anassets.kromtech.netlanding URL, which is consistent with the parameter normally holding a referrer-style URL. It also ends with'"><>.utm_medium,utm_campaign,utm_term,utm_content,userDefiner,epayIdandguideach carry a short tracking value and each ends with the same'"><>tail.landId=844,installer=rdandtrt=29_52351are plain values with no payload.landId=844is a plain number and is not part of the injection.reqid=carries the request identifier followed by the real payload:");%0aalert(1);//%0a</script><script>alert(1)</script>.
The important parts are:
- The path
/landings/123.14/selects the landing page that performs the reflection. - Every tracking parameter value ends with
'"><>, a sequence that closes a single-quoted string, a double-quoted attribute and a tag, so that whatever context the value lands in, the markup is broken out of. To see why, picture the page's HTML as a sentence with a gap where the parameter goes. If the gap sits inside a quoted attribute, the quote character in the payload ends the attribute early. If it sits inside a tag, the>ends the tag early. The payload tries all of these at once, so that a single request covers several possible contexts. - The
reqidparameter ends with");%0aalert(1);//%0a</script><script>alert(1)</script>. The");closes a quoted string and a call,%0ais a newline,alert(1)is the proof,//comments out the remainder of the line, and</script><script>alert(1)</script>provides a second, independent execution path in case the value is reflected inside a script block rather than HTML. - The
utm_sourcevalue is a URL-encoded reference to a web archive cache of anassets.kromtech.netlanding URL, which is consistent with the parameter normally holding a referrer-style URL.
A word on alert(1). JavaScript is the programming language browsers run to make pages interactive. alert(1) is a built-in browser function that pops up a small dialogue box showing the number 1. It does nothing harmful. Researchers use it as proof: if the box appears, the browser really did run their code, and the bug is real. The 1 is just a value to display.
The report does not include the server response, so the exact reflection point and the resulting markup are not shown. The construction of the payload, with breakouts for both an attribute context and a script context, indicates that the value is reflected into the page in one of those positions.
Root cause
The landing page takes query string values and writes them into the HTML response without context-aware output encoding. "Context-aware" means the encoding must match where the value is placed: a value inside an HTML attribute needs different treatment from a value inside a <script> block, because the browser parses those two places by different rules.
Because the payload includes both HTML breakouts ('"><>) and a JavaScript breakout (");), the reflection is likely happening inside an inline script or an attribute that is later interpreted as script, rather than in plain text content. An inline script is JavaScript written directly into the HTML page between <script> and </script> tags, rather than loaded from a separate file.
The landId=844 value in the URL is a plain number and is not part of the injection.
Impact
An attacker who can persuade a victim to open the crafted URL runs JavaScript in the origin of mackeeperapp.mackeeper.com. The origin is the combination of scheme, host and port, here https://mackeeperapp.mackeeper.com; the browser treats each origin as a separate security zone. Code running in an origin can read and act on things that belong to that origin, such as cookies (small pieces of data a site stores in your browser, often to keep you logged in) and data the page can fetch.
The programme rated the issue low severity, which is consistent with a reflected XSS that requires user interaction and has no described path to sensitive data or privileged actions.
Fix
The appropriate remediation is to encode every reflected query parameter according to the context it is written into: HTML entity encoding for element and attribute contexts, JavaScript string escaping for values placed inside scripts, and avoiding inline script construction from request data altogether. Server-side validation that restricts tracking parameters to their expected character sets (for example, identifiers and URLs) would also reduce the attack surface.
Variants to test
- Apply the same breakout sequence to each tracking parameter individually rather than all at once, to find which ones are reflected and in which context. A positive result is an
alertfiring from a single parameter. - Try the HTML-only breakout
'"><>without the script portion, to see whether the reflection is in markup. A positive result is injected markup appearing in the rendered page. - Try the script-only breakout
");alert(1);//without the HTML portion, to see whether the reflection is inside an inline script. A positive result is execution without any tag injection. - Test the numeric path segment (
/landings/123.14/) and the numeric parameters (landId,epayId,trt) for reflection, since these may be handled differently from the string parameters. A positive result is any of them appearing unencoded in the response. - Test the same parameter names on other hosts under the same wildcard scope. A positive result is the same reflection behaviour on a sibling host.
Hunting notes
Landing pages and affiliate tracking endpoints are a good place to look for reflected XSS because they accept many free-form parameters for attribution and are often built from templates that interpolate request data directly. Interpolating means slotting a value into a template, the way a mail merge slots a name into a letter.
During recon, look for hosts under a wildcard scope that serve marketing paths such as /landings/, and for parameters like utm_*, affid, guid and reqid that are echoed back into the page. Recon here means the early survey work of mapping what a target exposes. A quick signal is a unique marker string appearing verbatim in the response body; from there, determine the surrounding context and choose the matching breakout. The report shows the value of a payload that covers several contexts at once, so that a single request demonstrates execution regardless of where the value lands.
The report gives only a reproduction URL, with no described impact chain, which is typical for low-severity reflected XSS.
Glossary
- Affiliate: an independent marketer who sends visitors to a company's site in exchange for payment for resulting sales or installs.
- Asset: a single system or host listed in a bug bounty programme's scope.
- Attribute: a name and value written inside an HTML tag, such as
href="...", that configures the element. - Bounty: the money a programme pays a researcher for a valid report.
- Bug bounty programme: an arrangement where a company invites researchers to report security problems privately in exchange for rewards.
- Context-aware output encoding: converting characters that are special in a given place (HTML text, an attribute, a script) into harmless equivalents, using rules that match that place.
- Cookie: a small piece of data a website stores in your browser, often used to keep you logged in or to remember settings.
- Cross-site scripting (XSS): a bug where a site lets attacker-supplied content run as code in a visitor's browser.
- GET request: the ordinary request a browser makes to fetch a page or resource from a server.
- HackerOne: a platform that hosts bug bounty programmes and the reports submitted to them.
- Host: the server name in a URL, such as
mackeeperapp.mackeeper.com. - HTML: the markup language that describes the structure and content of a web page.
- HTML entity encoding: replacing characters such as
<,>and quotes with codes that display as text instead of being treated as markup. - Inline script: JavaScript written directly inside a page between
<script>and</script>tags. - JavaScript: the programming language browsers run to make pages interactive.
- Landing page: the page a marketing campaign sends a visitor to.
- Low severity: a rating meaning the issue is real but limited in impact or requires significant conditions to exploit.
- Origin: the combination of scheme, host and port that the browser treats as one security zone.
- Parameter: a
name=valuepair in a URL's query string. - Path: the part of a URL after the host and before the query string, such as
/landings/123.14/. - Payload: the crafted input an attacker supplies to trigger a bug.
- Query string: the part of a URL after the
?, made of parameters separated by&. - Recon: the early survey work of mapping what a target exposes.
- Reflected XSS: XSS where the payload goes in with one request and comes straight back in that request's response, without being stored.
- Remediation: the fix for a vulnerability.
- Scope: the set of systems a programme allows researchers to test.
- Subdomain: a host that sits under a parent domain, such as
mackeeperappundermackeeper.com. - Template: a page skeleton with gaps where values are slotted in.
- Tracking parameter: a URL parameter that records where a visitor came from or which campaign sent them.
- Unauthenticated: reachable without logging in.
- URL: the address of a resource on the web.
- URL encoding: writing characters in a URL as
%followed by two hexadecimal digits, so that characters with special meaning can be carried safely. - UTM parameters: the standard set of tracking parameters (
utm_source,utm_medium,utm_campaign,utm_term,utm_content) used for campaign attribution. - Wildcard: a
*in a scope entry meaning "any value here", so*.mackeeper.comcovers every subdomain.