Skip to content
XSS Disclosed report Beginner

RXSS on thankyou.pixels.php (yapi.mackeeper.com)

A reflected cross-site scripting vulnerability exists in the thankyou.pixels.php script on yapi.mackeeper.com because the orderid parameter is inserted into the HTML without proper encoding. An attacker could craft a link that executes arbitrary JavaScript in a victim's browser.

sec0ndw0lf Follow

Originally disclosed on HackerOne

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

Summary by the program

Summary

Reflected Cross-Site Scripting attack on yapi.mackeeper.com domain. The problem in /billing/thankyou.pixels.php script that passes a value of vulnerable parameter directly to HTML code of the page.

Step to reproduce

https://yapi.mackeeper.com/billing/thankyou.pixels.php?source=ppg&amount=118.800000&orderid=930799331063'}});</script><script>alert(document.domain)</script>%3balert(1)%2f%2f663&customerid=3250462&quantity=1&clid=185.11394286.1432610720.6.mzb&affid=mzb_2416&xprepay=bn_mk_ppi_kyloren_ppg&productId=29&item1=11559&amount1=118.800000&status=paid

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

What the report shows

The target is the Clario program's wildcard asset *.mackeeper.com, specifically the host yapi.mackeeper.com. The affected feature is the billing thank-you page served by the script /billing/thankyou.pixels.php. According to the program's summary, that script takes the value of a vulnerable parameter and passes it directly into the HTML of the page, which produces a reflected cross-site scripting condition.

The researcher demonstrated it with a single crafted URL. The orderid parameter carries the payload, and the rest of the query string looks like a normal order confirmation request:

HTTP
https://yapi.mackeeper.com/billing/thankyou.pixels.php?source=ppg&amount=118.800000&orderid=930799331063'}});</script><script>alert(document.domain)</script>%3balert(1)%2f%2f663&customerid=3250462&quantity=1&clid=185.11394286.1432610720.6.mzb&affid=mzb_2416&xprepay=bn_mk_ppi_kyloren_ppg&productId=29&item1=11559&amount1=118.800000&status=paid

The payload inside orderid contains a quote, closing braces, a closing </script> tag and a new script element that calls alert(document.domain), which suggests the value lands inside an existing inline script. The trailing %3balert(1)%2f%2f663 is the URL-encoded remainder ;alert(1)//663. The reproduction is simply loading that URL in a browser.

The report was disclosed on 13 June 2020, rated low severity, and paid a bounty of 75.00 USD. The weakness is classified as reflected cross-site scripting. The summary does not describe a fix or a retest.

Root cause

The report points to one mistake: the script reflects a request parameter into the page's HTML without encoding it for the context it lands in. The payload's structure, a quote, closing braces, a closing </script> tag and a fresh <script> element, suggests the value is placed inside an existing inline script, likely as part of a JavaScript string or object literal. Breaking out of that context requires only that the characters are not escaped or rejected. The report does not show the surrounding server-side code, so the exact sink is inferred rather than demonstrated.

Impact

The report frames the issue as reflected XSS on the billing host. An attacker who can get a victim to open the crafted link runs script in the context of yapi.mackeeper.com. The report does not analyse what session data or billing actions are reachable from that origin. Because the payload sits in a URL, delivery depends on the victim following the link.

How this kind of bug works

Reflected XSS happens when an application copies data from the request into the response without context-aware output encoding. The browser cannot tell developer-written markup from injected markup, so any characters that terminate the current context (an HTML tag, an attribute, a quoted string, a script block) let the attacker start a new one. The classic mistake is HTML-escaping a value that is actually interpolated into JavaScript, where </script> still ends the block regardless of HTML entities, or vice versa.

Defences are layered. Output encoding must match the sink: HTML entity encoding for element text, attribute encoding for attribute values, JavaScript string escaping for script data, and JSON encoding for data embedded in scripts. A strict Content Security Policy that disallows inline script blunts most payloads even when encoding fails. Framework auto-escaping helps only if developers do not bypass it, and input validation or allow-lists on fields such as order identifiers reduce the attack surface further.

How to test for it

  1. Map parameters that end up in the response: search fields, order and transaction identifiers, redirect targets, error messages, and anything echoed into a confirmation page.
  2. Send a benign marker first, such as a unique alphanumeric string, and locate every place it appears in the response body, including inside <script> blocks and attributes.
  3. Identify the context at each reflection and send a context-appropriate probe: a quote and angle brackets for HTML, a quote plus </script> for script blocks, and a quote for attributes.
  4. Confirm execution in a real browser rather than trusting the raw response, since some reflections are inert because of encoding or CSP.
  5. Check whether the parameter is reflected on a page that requires no authentication, and whether the value survives URL decoding and any normalisation.

A positive result is a probe that changes the parsed structure of the page and executes in the browser. Common false positives are reflections that are fully encoded, values that appear only in a JSON response consumed safely, payloads blocked by CSP, and self-XSS where the value is only reflected back to the same user through a stored profile field with no cross-user path.

How it is fixed

Apply context-aware output encoding at every sink, so the reflected value cannot terminate its context. Where values are embedded in scripts, serialise them as JSON and avoid string concatenation into inline script. Add a Content Security Policy that forbids inline script and restricts script sources. Validate parameters that have a known format, such as numeric order identifiers, and reject anything else. Regression tests should assert that metacharacters are encoded in the rendered page.

Hunting notes

Reflected XSS tends to hide in legacy scripts, payment and checkout flows, marketing landing pages, and endpoints that build HTML by hand. Parameters that look numeric or structured, like order identifiers, are often assumed safe and skipped by validation. Recon signals include old PHP or CGI paths, parameters echoed into inline JavaScript, and hosts on wildcard scopes that sit outside the main application.

Keep the payload minimal and avoid destructive actions.

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 security flaw on a website run by a company called Clario, on a host named yapi.mackeeper.com. The company had opened a bug bounty programme, which is a scheme where outside researchers are invited to look for security problems and report them, sometimes for a reward. The report was made public on 13 June 2020. It was rated low severity and paid a bounty of 75.00 USD.

The affected feature is a billing thank-you page. When you buy something online, the shop usually sends you to a page that confirms your order, often with an order number in the web address. That page is generated by a small program (a script) at the path /billing/thankyou.pixels.php. The script reads values from the web address and puts them into the page it sends back. According to the programme's summary, one of those values is inserted directly into the page's HTML without being made safe first. HTML is the language that describes the structure of a web page, and inserting untrusted text into it unchecked is what creates the bug.

The bug class is reflected cross-site scripting, usually shortened to XSS. To understand it, think of a web page as a form letter. The server fills in a few blanks from what you typed, then hands you the finished letter. If you type something that looks like a printing instruction rather than ordinary text, the letter will follow that instruction. In a browser, the "printing instructions" are HTML tags and JavaScript, the programming language browsers run. If a site copies your input into the page without neutralising it, your input can become code that the browser executes.

"Reflected" means the value comes in with the request and bounces straight back in the response. A request is simply the message your browser sends to a server when you open a link or submit a form. The attacker does not need to store anything on the server; they only need the victim to open a prepared link.

The researcher demonstrated the flaw with one crafted URL. The orderid parameter, which normally holds an order number, carries the attack instead, while the rest of the address looks like a genuine order confirmation:

HTTP
https://yapi.mackeeper.com/billing/thankyou.pixels.php?source=ppg&amount=118.800000&orderid=930799331063'}});</script><script>alert(document.domain)</script>%3balert(1)%2f%2f663&customerid=3250462&quantity=1&clid=185.11394286.1432610720.6.mzb&affid=mzb_2416&xprepay=bn_mk_ppi_kyloren_ppg&productId=29&item1=11559&amount1=118.800000&status=paid

Reading it piece by piece:

  1. https://yapi.mackeeper.com/billing/thankyou.pixels.php is the page being requested.
  2. Everything after the ? is the query string, a list of name and value pairs separated by &. Parameters are just these named values; source, amount, customerid and the others are ordinary ones you would expect on an order page.
  3. orderid=930799331063'}});</script><script>alert(document.domain)</script>%3balert(1)%2f%2f663 is the malicious part. The opening 930799331063 looks like a real order number, then the payload begins.
  4. The ', }}); and </script> break out of the page's own code, which suggests the value sits inside an existing inline script.
  5. </script> closes the script block that was already on the page, and <script>alert(document.domain)</script> opens a fresh script block containing alert(document.domain). The alert function makes the browser show a pop-up box, and document.domain is the site's own address, so the pop-up proves which site the code is running on.
  6. %3balert(1)%2f%2f663 is URL encoding, a way of writing characters that are awkward in a web address. Decoded, it is ;alert(1)//663.

To reproduce it, you load that URL in a browser. If the page runs the injected script, a pop-up appears.

Why does this matter? Code running as that site runs in the context of yapi.mackeeper.com. The report does not analyse what session data or billing actions were reachable from that host. The catch for an attacker is that the victim has to follow the crafted link, which is why the report was rated low. The summary does not describe a fix or a retest, and it does not analyse what session data or billing actions were reachable from that host.

The underlying mistake is one: the script reflects a request parameter into the page's HTML without encoding it for the place it lands. The payload's shape, a quote, closing braces, a closing </script> tag and a new <script> element, suggests the value is placed inside an existing inline script, probably as part of a JavaScript string or object. Breaking out needs only that those characters are not escaped or rejected. The report does not show the server-side code, so the exact insertion point is inferred rather than demonstrated.

In general, how this kind of bug works

Reflected XSS happens when an application copies data from the request into the response without context-aware output encoding. Encoding means converting characters that have a special meaning into harmless equivalents, so a < becomes text rather than the start of a tag. "Context-aware" means the conversion must suit the destination: text between tags, a value inside an attribute, a string inside a script block and data inside a JSON object each need different treatment. The browser cannot tell developer-written markup from injected markup, so any character that ends the current context lets an attacker start a new one. A classic mistake is HTML-escaping a value that is actually placed inside JavaScript, where </script> still ends the block regardless of HTML entities, or the reverse.

Defences are layered. Output encoding must match the sink, the place where the value ends up. A strict Content Security Policy, a set of rules the server sends telling the browser which scripts may run, that disallows inline script blunts most payloads even when encoding fails. Framework auto-escaping helps only if developers do not bypass it, and validation or allow-lists on fields such as order identifiers shrink the attack surface further.

To test for it yourself:

  1. Map parameters that end up in the response: search fields, order and transaction identifiers, redirect targets, error messages, and anything echoed into a confirmation page.
  2. Send a harmless marker first, such as a unique string of letters and digits, and find every place it appears in the response, including inside script blocks and attributes.
  3. Identify the context at each reflection and send a probe suited to it: a quote and angle brackets for HTML, a quote plus </script> for script blocks, a quote for attributes.
  4. Confirm execution in a real browser rather than trusting the raw response, since some reflections are inert because of encoding or CSP.
  5. Check whether the parameter is reflected on a page that needs no login, and whether the value survives URL decoding and normalisation.

A positive result is a probe that changes the parsed structure of the page and executes. Common false positives are reflections that are fully encoded, values that appear only in a JSON response consumed safely, payloads blocked by CSP, and self-XSS, where the value is only reflected back to the same user through a stored profile field with no path to another user.

The fix is context-aware output encoding at every sink, so the reflected value cannot end its context. Where values are embedded in scripts, serialise them as JSON and avoid string concatenation into inline script. Add a Content Security Policy that forbids inline script and restricts script sources. Validate parameters with a known format, such as numeric order identifiers, and reject anything else. Regression tests should assert that metacharacters are encoded in the rendered page.

Reflected XSS tends to hide in legacy scripts, payment and checkout flows, marketing landing pages, and endpoints that build HTML by hand. Parameters that look numeric or structured, like order identifiers, are often assumed safe and skipped by validation. Recon signals include old PHP or CGI paths, parameters echoed into inline JavaScript, and hosts on wildcard scopes that sit outside the main application.

Keep the payload minimal and avoid destructive actions.

Glossary

  • Bug bounty programme: a scheme where a company invites outside researchers to report security flaws, often for a reward.
  • Host: a single named server on the internet, such as yapi.mackeeper.com.
  • Wildcard asset: a scope covering every host under a domain, written like *.mackeeper.com.
  • Script: a small program, here one that runs on the server to build a page.
  • HTML: the language that describes the structure and content of a web page.
  • Request: the message a browser sends to a server when you open a link or submit a form.
  • Response: the message the server sends back, containing the page.
  • Query string: the part of a web address after the ?, holding name and value pairs.
  • Parameter: one named value in a query string, such as orderid.
  • Cross-site scripting (XSS): a bug where untrusted input becomes code that runs in a victim's browser.
  • Reflected XSS: XSS where the input comes in with the request and bounces straight back in the response.
  • Payload: the crafted piece of input designed to trigger the bug.
  • JavaScript: the programming language browsers run to make pages interactive.
  • alert: a JavaScript function that shows a pop-up box, often used to prove code ran.
  • document.domain: a JavaScript property holding the site's own address.
  • URL encoding: writing characters in a web address as % followed by two digits so they travel safely.
  • Comment: code syntax that tells the browser to ignore the rest of a line, here //.
  • Cookie: a small piece of data a site stores in your browser, often used to keep you logged in.
  • Output encoding: converting special characters into harmless equivalents before placing them in a page.
  • Sink: the place in the page where a value ends up, such as text, an attribute or a script block.
  • Content Security Policy (CSP): rules sent by the server telling the browser which scripts may run.
  • JSON: a text format for structured data, often embedded in pages and scripts.
  • Self-XSS: a reflection that only affects the user who entered the value, with no path to another user.
  • False positive: a result that looks like a bug but is not 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.