Skip to content
XSS Disclosed report Beginner

RXSS on landings/land/3/ron_clean_17_app3_alerts/index.php (mackeeperapp3.mackeeper.com)

A landing page script took a GET parameter and inserted its value directly into the page's HTML, so a crafted link could run script in the visitor's browser. An attacker could send such a link to a victim and execute JavaScript in the context of the mackeeper.com site.

sec0ndw0lf Follow

Originally disclosed on HackerOne

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

Summary by the program

Summary

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

Step to reproduce

http://mackeeperapp3.mackeeper.com/landings/land/3/ron_clean_17_app3_alerts/index.php?kola=bro"></options></form><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 the Clario (MacKeeper) programme on HackerOne, scoped to *.mackeeper.com. The researcher, sec0ndw0lf, reported a reflected cross-site scripting issue in a landing page script. The report was rated low severity and paid a bounty of 75.00 USD; it was disclosed on 13 June 2020.

The title names the endpoint landings/land/3/ron_clean_17_app3_alerts/index.php on mackeeperapp3.mackeeper.com. The programme's own summary, however, describes the problem on mackeeperapp2.mackeeper.com and in the script /landings/land/1/ron_cleanprot17/index.php. The two descriptions do not match, and the report does not explain the discrepancy.

The programme summary states the mechanism plainly: the script takes any GET parameter and passes the value of that parameter directly into the HTML of the page. That is the whole of the root cause as described.

To reproduce, the report gives a single URL. The parameter is kola, its value is bro, and the rest of the value closes the surrounding markup and injects an image element whose onerror handler runs script:

HTTP
http://mackeeperapp3.mackeeper.com/landings/land/3/ron_clean_17_app3_alerts/index.php?kola=bro"></options></form><img src=x onerror=alert(document.domain)>

The payload closes an attribute and tag with ">, closes </options> and </form> elements, then adds an <img> with a broken src so that onerror fires. The payload calls alert(document.domain), which would show the domain of the landing page if the script runs.

The report does not include a response excerpt, a screenshot, a browser version, or any note on how or when the issue was fixed. Beyond the severity and bounty, the outcome is not documented in the text.

Root cause

The mistake is a missing output encoding step. A value supplied by the user through the query string is concatenated into the server-generated HTML without being escaped for the context in which it lands. Because the reflection point is inside an element attribute and inside a form, an attacker who controls the parameter can break out of both and introduce new markup and event handlers. The programme summary states the parameter value is passed directly into the page's HTML.

Impact

The report frames the impact through the payload: script execution in the domain of the landing page, shown by alert(document.domain). The payload calls alert(document.domain), showing script would run in the domain of the landing page. The programme rated the issue low severity. The report itself does not enumerate affected users, data or accounts.

How this kind of bug works

Reflected cross-site scripting arises when an application takes input from the request, usually a query parameter, and writes it into the response without context-aware encoding. The browser cannot tell developer-written markup from attacker-supplied markup, so any characters that are meaningful to the HTML parser, such as <, >, ", ' and &, can change the structure of the document. If the injection point sits inside an attribute, closing the quote is enough to add a new attribute such as an event handler; if it sits in element content, a new tag is enough.

The reason it keeps appearing is that escaping is context-dependent. HTML body, attribute values, JavaScript string literals, CSS and URLs each need different treatment, and a single generic filter often misses one of them. The defences that stop it are output encoding applied at the point of rendering for the correct context, a restrictive Content-Security-Policy that blocks inline script and event handlers, and, where the value is never meant to be markup, rejecting or normalising dangerous characters on input as a secondary layer. HttpOnly cookies limit what a successful attack can steal but do not prevent the script from acting inside the page.

How to test for it

  1. Map the parameters. Crawl the target and collect every query parameter, including ones that look cosmetic, such as tracking, locale or layout switches. Landing pages and marketing funnels are full of these.
  2. Send a benign marker first. Replace each parameter value with a unique alphanumeric string and search the response body for it. This tells you whether and where the value is reflected, and in what context: element content, attribute, script block or URL.
  3. Choose a context-appropriate probe. For attribute contexts, try closing the quote and adding a harmless attribute; for element content, try a tag that cannot execute, such as a custom element, to see whether it is parsed as markup. Only escalate to an executing payload once you know the context.
  4. Confirm execution in a real browser, not just in the raw response. A payload that appears unescaped in the HTML but is neutralised by the parser, a sanitiser or a CSP is not a finding.
  5. Record the exact URL, the payload, and evidence of execution, such as the value returned by a domain alert or a screenshot of the dialog.

Common false positives: the marker appears only inside an HTML-encoded context where the angle brackets are entities; the reflection lands inside a JavaScript string that is itself correctly escaped; a Content-Security-Policy blocks the inline handler even though the markup is injected; the parameter is reflected only after a redirect to a different origin; or the page is served with a content type that stops the browser parsing it as HTML. Check each of these before reporting.

How it is fixed

Encode all user-controlled output for the context in which it is rendered, using the framework's escaping helpers rather than hand-written replacements. Where a parameter is only ever expected to hold a simple token, validate it against an allowlist and reject anything else. Add a Content-Security-Policy that disallows inline script and inline event handlers, which turns many injection attempts into harmless markup. Set session cookies with HttpOnly and Secure, and review landing page templates, which are often built outside the main application's escaping conventions.

Hunting notes

Reflected XSS tends to hide in places where templates are assembled quickly: landing pages, campaign and A/B testing variants, error and search pages, locale and currency switchers, and any parameter that is echoed into a form control or a hidden field. The endpoint in this report is a good example of the pattern, a numbered landing directory with a descriptive name and a free-form parameter.

Recon signals worth following: directories named landings, campaign, promo or lp; parameters with short, arbitrary names; pages that reflect a value into a <select> or <option>; and older PHP entry points that sit beside a modern application. Compare how the same parameter is handled on different subdomains, since escaping is often applied inconsistently across them.

The programme set a low severity and a bounty of 75.00 USD.

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

This report is about a bug on a website run by Clario, the company behind MacKeeper. The researcher, sec0ndw0lf, found a problem on one of the company's landing pages, the kind of page you land on after clicking an advert or a marketing link. The bug is called reflected cross-site scripting, usually shortened to XSS. The programme rated it low severity and paid a bounty of 75.00 USD. It was disclosed on 13 June 2020.

To understand the bug, you need two ideas. First, a request: when you type a web address into your browser, the browser sends a message to a server asking for a page, and the server sends the page back. Anything after a ? in the address is called a query string, and it carries small pieces of data called parameters, written as name=value. Second, a landing page is a simple promotional page, often built quickly and outside the main website's usual code.

The programme's own summary explains the mechanism in one sentence: the script takes any GET parameter and passes the value of that parameter directly into the HTML code of the page. HTML is the language that describes what a page contains, and the browser reads it to decide what to draw. If a value from the address bar is dropped into that HTML without being cleaned, the browser cannot tell the difference between text the developers wrote and text an attacker supplied. That is the whole root cause as described.

There is a mismatch in the report worth noting. The title names the endpoint landings/land/3/ron_clean_17_app3_alerts/index.php on mackeeperapp3.mackeeper.com, but the programme summary describes the problem on mackeeperapp2.mackeeper.com and in the script /landings/land/1/ron_cleanprot17/index.php. The report does not explain why the two descriptions differ.

To reproduce the issue, the report gives a single URL. The parameter is kola, its value starts as bro, and the rest of the value closes the surrounding markup and injects an image element whose onerror handler calls script:

HTTP
http://mackeeperapp3.mackeeper.com/landings/land/3/ron_clean_17_app3_alerts/index.php?kola=bro"></options></form><img src=x onerror=alert(document.domain)>

Reading the payload piece by piece:

  1. kola=bro is the ordinary parameter and value. Everything after it is the attack.
  2. "> closes the attribute value and the tag the parameter was sitting inside. This breaks out of the attribute and tag the value was sitting inside.
  3. </options></form> closes the surrounding elements, so the injected markup is no longer trapped inside the form.
  4. <img src=x onerror=alert(document.domain)> adds an image whose source, x, does not exist. When an image fails to load, the browser runs whatever is in its onerror handler, and here that handler is alert(document.domain).

alert(document.domain) would pop up a dialog showing the domain of the page, which would show script running in the origin of the landing page rather than a harmless string being printed. An origin is the combination of scheme, host and port that the browser uses to decide which page may touch which data, so script running in the site's origin can do what the site itself can do.

The report does not include a response excerpt, a screenshot, a browser version, or any note on how or when the issue was fixed. Beyond the severity and the bounty, the outcome is not documented.

In general, how this kind of bug works

Reflected cross-site scripting happens when a site takes input from the request, usually a query parameter, and writes it into the response without output encoding. Encoding means converting characters that have special meaning in HTML, such as <, >, ", ' and &, into harmless equivalents so the browser treats them as text. A useful comparison is a comment box on a form: if you write <b>hello</b> and the site shows it as bold text, the site treated your words as instructions; if it shows the literal angle brackets, it treated them as text. XSS is the first behaviour, applied to something an attacker controls.

If the injection point sits inside an attribute, closing the quote is enough to add a new attribute such as an event handler. If it sits in element content, a new tag is enough. The reason this keeps appearing is that encoding depends on context: HTML body, attribute values, JavaScript strings, CSS and URLs each need different treatment, and one generic filter often misses one of them.

The defences are output encoding applied at the point of rendering for the right context, a restrictive Content-Security-Policy (a header that tells the browser which scripts are allowed to run, and can block inline script and event handlers), and, where a value is never meant to be markup, rejecting dangerous characters on input as a second layer. HttpOnly cookies, which script cannot read, limit what a successful attack can steal, but they do not stop the script from acting inside the page.

In general, how to test for it

  1. Map the parameters. Browse the target and collect every query parameter, including ones that look cosmetic, such as tracking, locale or layout switches. Landing pages and marketing funnels are full of these.
  2. Send a benign marker first. Replace each parameter value with a unique string of letters and digits and search the returned page for it. This tells you whether and where the value appears, and in what context: element content, attribute, script block or URL.
  3. Choose a context-appropriate probe. For attribute contexts, try closing the quote and adding a harmless attribute; for element content, try a tag that cannot execute, to see whether it is parsed as markup. Only escalate to an executing payload once you know the context.
  4. Confirm execution in a real browser, not just in the raw response. A payload that appears unescaped in the HTML but is neutralised by the parser, a sanitiser or a Content-Security-Policy is not a finding.
  5. Record the exact URL, the payload, and evidence of execution, such as the value returned by a domain alert or a screenshot of the dialog.

Common false positives: the marker appears only where the angle brackets are already encoded as entities; the value lands inside a JavaScript string that is itself correctly escaped; a Content-Security-Policy blocks the inline handler even though the markup is injected; the parameter only appears after a redirect to a different origin; or the page is served with a content type that stops the browser parsing it as HTML. Check each of these before reporting.

In general, how it is fixed

Encode all user-controlled output for the context in which it is rendered, using the framework's escaping helpers rather than hand-written replacements. Where a parameter is only ever expected to hold a simple token, validate it against an allowlist and reject anything else. Add a Content-Security-Policy that disallows inline script and inline event handlers, which turns many injection attempts into harmless markup. Set session cookies with HttpOnly and Secure, and review landing page templates, which are often built outside the main application's escaping conventions.

Glossary

  • Reflected XSS: the attacker's input is sent in the request and echoed straight back in the response, rather than being stored on the server.
  • Request: the message a browser sends to a server asking for a page or data.
  • Query string: the part of a web address after the ?, carrying small pieces of data.
  • Parameter: one name=value pair inside a query string.
  • GET parameter: a parameter sent in the address bar as part of a GET request, the ordinary kind used when you open a link.
  • Landing page: a simple promotional page reached after clicking an advert or marketing link.
  • HTML: the language that describes the structure and content of a web page.
  • Attribute: a setting written inside an HTML tag, such as src or onerror.
  • Event handler: an attribute whose value is script that runs when something happens, such as an image failing to load.
  • Origin: the combination of scheme, host and port that the browser uses to decide which page may access which data.
  • Output encoding: converting characters with special meaning into harmless equivalents so the browser treats them as text.
  • Content-Security-Policy: a response header that tells the browser which scripts and resources are allowed, and can block inline script.
  • HttpOnly: a cookie flag that stops script from reading that cookie.
  • Secure: a cookie flag that sends the cookie only over encrypted connections.
  • Allowlist: a list of values that are permitted, with everything else rejected.
  • False positive: a result that looks like a bug but is not actually exploitable.

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.