Skip to content
XSS Disclosed report Beginner

CSS Injection on static.mackeeper.com - Potential XSS

A page on a static asset host took a URL parameter and used it to build a CSS @import, so an attacker could point the page at a stylesheet they control. The reporter showed that arbitrary CSS from an external server was loaded and applied, which they framed as a potential route to cross-site scripting.

m4ll0k Follow

Originally disclosed on HackerOne

  • Triaged in 9 hours
  • Fixed in 3 months
  • Paid in 16 days
  • Disclosed after 4 months

Summary by the program

Summary

CSS injection vulnerabilities arise when an application imports a style sheet from a user-supplied URL, or embeds user input in CSS blocks without adequate escaping. They are closely related to cross-site scripting (XSS) vulnerabilities but often trickier to exploit.

Steps to reproduce

the vulnerabile url is : https://static.mackeeper.com/landings/libs/alert/alerts/exitpopup74/exit-popup.php?root=https://+YOUR SERVER+/&lang=en

HTML
<style>
    @import url("https://YOUR SERVER/alert/alerts/exitpopup74/css/exit-popup.css");
</style>

create a css file with name exit-popup.css on this path /alert/alerts/exitpopup74/css/ now edit the css file exit-popup.css with this css code:

CSS
div {
 background-image: url("https://media.giphy.com/media/SggILpMXO7Xt6/giphy.gif");
 background-color: #cccccc;
}

now go to https://static.mackeeper.com/landings/libs/alert/alerts/exitpopup74/exit-popup.php?root=https://+Your+Server+/&lang=en

The original report as published on HackerOne, by m4ll0k. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the root parameter was inserted into a CSS @import without validation or escaping, letting the page load a stylesheet from any host.

What the attacker needed

Victim opens a crafted link; attacker hosts a stylesheet

How it was found

  1. Open the exit-popup page with the root parameter set to an attacker-controlled server.
  2. Host a stylesheet named exit-popup.css at the matching path on that server.
  3. Put arbitrary CSS rules in that stylesheet.
  4. Visit the page with the root parameter set to your server.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A web page can pull in a stylesheet from another address to control how it looks. Here the page trusted an address supplied in the link, so anyone could make it load a stylesheet from their own server. The reporter showed the page then displayed their styling, and warned this could be pushed further towards running script.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by m4ll0k

View all

5 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.