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.
- 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
<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:
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
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
- Open the exit-popup page with the root parameter set to an attacker-controlled server.
- Host a stylesheet named exit-popup.css at the matching path on that server.
- Put arbitrary CSS rules in that stylesheet.
- 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.