Skip to content
XSS Disclosed report Beginner

Reflected XSS (mackeeperapp2.mackeeper.com)

A download script on a MacKeeper landing page echoed a GET parameter straight into the HTML response, so a crafted link could run script in the victim's browser. The same code base was also present on three sibling hosts.

sec0ndw0lf Follow

Originally disclosed on HackerOne

Bounty$75incl. $25 bonus Low View original
  • Triaged in 17 hours
  • Fixed in 22 days
  • Paid in 18 days
  • Disclosed after 7 months

Summary by the program

Summary

Hi! I found Reflected Cross-Site Scripting attack on mackeeperapp2.mackeeper.com. The problem in /landings/land/1/ron_cleanprot17/download.php script that take any GET parameter and pass value of this parameter directly to HTML code of the page.

Also, don't forget for mackeeperapp.mackeeper.com, mackeeperapp1.mackeeper.com and mackeeperapp3.mackeeper.com hosts, they have the same code base.

Step to reproduce

http://mackeeperapp2.mackeeper.com/landings/land/1/ron_cleanprot17/download.php?op=blabla"></option></for><img src=x onerror=alert(document.domain)>

The original report as published on HackerOne, by sec0ndw0lf. 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 is a reflected cross-site scripting flaw on mackeeperapp2.mackeeper.com, a host in the Clario (MacKeeper) programme's *.mackeeper.com scope. The researcher, sec0ndw0lf, identified the vulnerable script as /landings/land/1/ron_cleanprot17/download.php, which takes a GET parameter and writes its value straight into the HTML of the page.

The report notes that the same code base is also present on three sibling hosts: mackeeperapp.mackeeper.com, mackeeperapp1.mackeeper.com and mackeeperapp3.mackeeper.com.

The reproduction is a single request. The op parameter carries a value that first closes the surrounding markup and then injects an image element whose onerror handler runs script:

HTTP
http://mackeeperapp2.mackeeper.com/landings/land/1/ron_cleanprot17/download.php?op=blabla"></option></for><img src=x onerror=alert(document.domain)>

The payload uses document.domain as the alert argument, which would show the origin of the page if it executes. The report does not include a response body, a screenshot or a video, so the exact surrounding markup that the "></option></for> sequence breaks out of is not shown.

Root cause

The likely root cause is that download.php reads a request parameter and concatenates it into the HTML response without context-aware output encoding. The payload's leading "></option></for> is an attempt to close the surrounding markup, after which the <img> with an onerror handler would be parsed as HTML. The report does not show the surrounding markup. Because the reflection is immediate and tied to the request, the bug is reflected rather than stored.

Impact

The payload is designed to run script in the origin of the affected host when a victim follows a crafted link. In this report the proof is an alert(document.domain), which shows code execution but not what an attacker would do with it. The practical impact depends on what the origin holds: cookies without the HttpOnly flag, session state, or the ability to render convincing content on a trusted-looking domain. The report itself makes no claim beyond the alert, and the low severity rating reflects that limited demonstration.

How this kind of bug works

Reflected XSS happens when an application takes input from the current request and places it into the response without encoding it for the context it lands in. The browser parses the response as HTML, so any markup the attacker supplies becomes part of the document. If the injected markup includes an event handler such as onerror, or a <script> element, the browser executes it in the page's origin.

The context matters. A value placed between tags needs < and > to break out. A value placed inside a quoted attribute needs a matching quote to escape, then a new attribute or a tag close. A value placed inside a JavaScript string, a URL or a CSS block needs different break-out characters. Correct defence is context-aware output encoding: HTML-entity encoding for HTML text, attribute encoding for attribute values, JavaScript encoding for script blocks and URL encoding for URL contexts. A restrictive Content Security Policy that disallows inline script and onerror handlers provides defence in depth but does not replace encoding. Input validation and blocklists of characters like < are weaker, because they are easy to bypass and often break legitimate input.

How to test for it

  1. Map every parameter that is reflected in the response: query string, path segments, headers that end up in the body, and form fields. Tools that crawl and replay requests help, but manual review of the response is what confirms the context.
  2. For each reflection, note where the value lands: HTML text, an attribute value, inside a <script> block, in a URL, or in a style. The break-out sequence depends on this.
  3. Send a benign marker first, such as a unique alphanumeric string, and confirm it appears unencoded in the response. If it appears as &lt; or is stripped, encoding or filtering is in place.
  4. Send a context-appropriate probe. For HTML text, a tag with an event handler; for an attribute, a quote followed by a new attribute or tag; for a script block, a string break-out. Use a harmless action such as an alert of a fixed string to prove execution.
  5. Confirm execution in a real browser, not just in the response body. A payload that appears in the HTML but does not run, because of CSP, a sandboxed iframe or a browser parser quirk, is not a finding.

Common false positives: the value is reflected but HTML-encoded; the reflection lands in a context where the browser does not execute it, such as inside a comment or a <textarea>; a CSP blocks inline handlers; the page is served with Content-Disposition: attachment so it is downloaded rather than rendered; or the reflection only appears in a response to a request the victim cannot be made to send, such as one requiring a custom header.

How it is fixed

Apply context-aware output encoding at the point where the value is written into the response, using the framework's escaping helpers rather than hand-rolled replacements. Where the parameter is not needed in the output, remove it. Add a Content Security Policy that forbids inline script and event handlers as a second layer. Set session cookies with HttpOnly and Secure so that script cannot read them. Validate and constrain input where the application's logic allows it, but treat encoding as the primary control.

Hunting notes

Reflected XSS tends to hide in older or secondary code paths: landing pages, download endpoints, marketing microsites, error pages, search results and redirect handlers. Hosts that share a code base, as the report notes for the sibling mackeeperapp hosts, are worth checking in parallel, because a fix on one may lag on another. Recon signals include parameters whose names suggest display or messaging (op, msg, error, redirect, return, lang), endpoints under paths like /landings/, and responses that echo request data verbatim. Comparing the same parameter across sibling hosts often reveals inconsistent encoding.

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

What happened, in plain words

This report describes a bug on a website run by Clario, the company behind MacKeeper. The researcher, sec0ndw0lf, found that one page on mackeeperapp2.mackeeper.com would take a value from the address bar of the browser and paste it straight into the page it sends back, without cleaning it first. That is the whole idea behind the bug class called reflected cross-site scripting, or XSS for short.

A quick comparison: imagine a shop assistant who writes your name on a parcel exactly as you spell it out, even if you say "my name is Bob and also please write FREE on this box". The assistant does not check whether what you said is a name or an instruction. A web page that reflects input without encoding behaves the same way: whatever the visitor puts in the link is treated as part of the page's own instructions.

The vulnerable script is /landings/land/1/ron_cleanprot17/download.php. According to the report, it takes any GET parameter and passes the value directly into the HTML code of the page. A GET parameter is the part of a web address after the question mark, such as ?op=blabla. The page reads that value and writes it into the HTML it returns. HTML is the language browsers use to describe a page: tags like <img> or <option> tell the browser what to draw.

The report also notes that the same code base is used on three sibling hosts: mackeeperapp.mackeeper.com, mackeeperapp1.mackeeper.com and mackeeperapp3.mackeeper.com. In plain terms, the same code base is used on those machines, so the same script may exist there too.

The reproduction step by step

The report gives a single request to reproduce the bug:

HTTP
http://mackeeperapp2.mackeeper.com/landings/land/1/ron_cleanprot17/download.php?op=blabla"></option></for><img src=x onerror=alert(document.domain)>

Reading it piece by piece:

  1. http://mackeeperapp2.mackeeper.com/landings/land/1/ron_cleanprot17/download.php is the address of the page. It is a download page under a landing path, which is marketing-speak for a page built to promote a product.
  2. ?op=blabla starts the query string. op is the parameter name and blabla is the value the researcher chose. On its own this is harmless filler.
  3. "></option></for> is the interesting part. The two characters " and > first close whatever HTML attribute and tag the value was sitting inside. The </option> and </for> then close two more elements. The report does not show the page source, so the exact tags being closed are not visible in the report.
  4. <img src=x onerror=alert(document.domain)> is the injected HTML. It asks the browser to load an image from a location called x, which does not exist. When the load fails, the browser runs the onerror handler, which is a small piece of JavaScript attached to the image tag. That handler calls alert(document.domain), a pop-up showing the domain of the page.

Why does the pop-up matter? Because document.domain is read by the browser from the page's own address. If the pop-up shows mackeeperapp2.mackeeper.com, the script ran as if it were part of that site, not in some isolated sandbox. The report does not include a screenshot, a video or the response body, so the exact HTML around the injection point is not shown.

Why it happens

The likely cause is that download.php reads the op value and glues it into the HTML response without context-aware output encoding. Encoding means converting characters that have special meaning in HTML, such as < and >, into safe equivalents so the browser displays them as text instead of treating them as instructions. The leading "></option></for> suggests the value lands inside an attribute or an element that the attacker can close, after which the <img> tag is parsed as real HTML. Because the value comes from the current request and is echoed back immediately, the bug is called reflected rather than stored: nothing is saved on the server for later visitors.

What an attacker could do

The crafted link is designed to run script in that site's origin when a victim opens it. Origin is the combination of scheme, host and port that the browser uses to decide which site a page belongs to. Script running in that origin can, in principle, read cookies that are not marked HttpOnly, act on the user's session, or draw convincing content on a domain the user trusts. In this report the only demonstrated action is the alert, and the low severity rating reflects that limited proof. The report makes no claim beyond the alert.

In general, how this kind of bug works

Reflected XSS happens when an application takes input from the current request and places it into the response without encoding it for the context it lands in. The browser parses the response as HTML, so any markup the attacker supplies becomes part of the document. If the injected markup includes an event handler such as onerror, or a <script> element, the browser executes it in the page's origin.

The context matters. A value placed between tags needs < and > to break out. A value inside a quoted attribute needs a matching quote to escape, then a new attribute or a tag close. A value inside a JavaScript string, a URL or a CSS block needs different break-out characters. The correct defence is context-aware output encoding: HTML-entity encoding for HTML text, attribute encoding for attribute values, JavaScript encoding for script blocks and URL encoding for URL contexts. A restrictive Content Security Policy, a browser rule that says which scripts may run, adds defence in depth but does not replace encoding. Input validation and blocklists of characters like < are weaker, because they are easy to bypass and often break legitimate input.

In general, how to test for it

  1. Map every parameter that is reflected in the response: query string, path segments, headers that end up in the body, and form fields. Crawling tools help, but reading the response by hand is what confirms the context.
  2. For each reflection, note where the value lands: HTML text, an attribute value, inside a <script> block, in a URL, or in a style. The break-out sequence depends on this.
  3. Send a harmless marker first, such as a unique string of letters and digits, and confirm it appears unencoded in the response. If it appears as &lt; or is stripped, encoding or filtering is in place.
  4. Send a context-appropriate probe. For HTML text, a tag with an event handler; for an attribute, a quote followed by a new attribute or tag; for a script block, a string break-out. Use a harmless action such as an alert of a fixed string to prove execution.
  5. Confirm execution in a real browser, not just in the response body. A payload that appears in the HTML but does not run, because of a Content Security Policy, a sandboxed iframe or a browser parser quirk, is not a finding.

Common false positives: the value is reflected but HTML-encoded; the reflection lands where the browser does not execute it, such as inside a comment or a <textarea>; a Content Security Policy blocks inline handlers; the page is served with Content-Disposition: attachment so it is downloaded rather than rendered; or the reflection only appears in a response to a request the victim cannot be made to send, such as one requiring a custom header.

In general, how it is fixed

Apply context-aware output encoding at the point where the value is written into the response, using the framework's escaping helpers rather than hand-rolled replacements. Where the parameter is not needed in the output, remove it. Add a Content Security Policy that forbids inline script and event handlers as a second layer. Set session cookies with HttpOnly and Secure so that script cannot read them. Validate and constrain input where the application's logic allows it, but treat encoding as the primary control.

In general, where to look

Reflected XSS tends to hide in older or secondary code paths: landing pages, download endpoints, marketing microsites, error pages, search results and redirect handlers. Hosts that share a code base, as this report notes for the sibling mackeeperapp hosts, are worth checking in parallel, because a fix on one may lag on another. Signals worth watching include parameters whose names suggest display or messaging (op, msg, error, redirect, return, lang), endpoints under paths like /landings/, and responses that echo request data verbatim. Comparing the same parameter across sibling hosts often reveals inconsistent encoding.

Glossary

  • XSS (cross-site scripting): a bug where a site lets an attacker's code run in a visitor's browser as part of that site.
  • Reflected XSS: XSS where the malicious value comes from the current request and is echoed straight back, rather than being stored on the server.
  • GET parameter: a name and value pair in the part of a web address after the question mark, sent to the server with the request.
  • Query string: everything after the ? in a URL, made up of parameters.
  • HTML: the markup language browsers use to describe a page's structure and content.
  • Tag: an HTML instruction such as <img> or <option> that tells the browser what to render.
  • Attribute: a setting inside an HTML tag, such as src or onerror.
  • Event handler: a piece of script attached to an element that runs when something happens, such as an image failing to load.
  • JavaScript: the programming language browsers run inside web pages.
  • document.domain: a browser property that returns the domain of the current page, useful as proof of which origin script is running in.
  • Origin: the combination of scheme, host and port that the browser uses to separate one site from another.
  • Output encoding: converting special characters into safe equivalents so the browser treats input as text, not instructions.
  • Context-aware encoding: choosing the right encoding for where the value lands, such as HTML text, an attribute, a script block or a URL.
  • Content Security Policy (CSP): a browser rule set by the site that limits which scripts may run.
  • HttpOnly: a cookie flag that stops JavaScript from reading the cookie.
  • Secure: a cookie flag that sends the cookie only over HTTPS.
  • Cookie: a small piece of data a site stores in the browser, often used to keep a user logged in.
  • Session: the state that ties a series of requests to one logged-in user.
  • Sandboxed iframe: an embedded page restricted by the browser so it cannot act with the full privileges of the parent site.
  • False positive: a test result that looks like a bug but is not exploitable in practice.
  • Bounty: a payment made by a programme to a researcher for a valid report.
  • Severity: a rating of how serious a bug is, often low, medium, high or critical.
  • Code base: the shared set of source files that a site or several sites are built from.

More by sec0ndw0lf

View all

6 more disclosed reports, best first.

More from Clario

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.