agentleFS
mahumadadmahumadad/quarry/skills/hunt/css-injection/SKILL.md

css-injection

Skill1 starsChanged 11 days agoMITView on GitHub

Test confirmed style/markup sinks for CSS-based data exposure or UI manipulation when script execution is not required. Use after mapping a CSS/HTML injection sink; do not relabel ordinary missing CSP or self-only styling as a finding. Keywords: CSS injection, attribute selector exfiltration, style injection, CSS data leak.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If script execution is possible, route the XSS hypothesis to xss instead of double-reporting.

    line 27
  2. Distinctive:

    For selector-based inference,: use only a canary attribute you created.

    line 31

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Prerequisites

  • A specific attacker-controlled value reaches a style block, stylesheet, style attribute, or CSS-aware renderer. Preserve the exact sink and identity.
  • Authorization for any callback/OAST infrastructure and for state-changing test fixtures.
  • A unique canary in your own test account; never target another user's secrets.

Methodology

  1. Confirm the sink without assuming XSS. Inject benign CSS with a unique marker and verify where it lands, which sanitization applies, and whether other users can view it. If script execution is possible, route the XSS hypothesis to xss instead of double-reporting.
  2. Measure impact classes separately: UI redress or hidden controls; cross-origin resource loads; CSS selector-based inference of sensitive attributes; font/import/parser behavior. A visual defacement alone is not evidence of secret extraction.
  3. For selector-based inference, use only a canary attribute you created. Compare a matching and a non-matching selector in the same browser and identity. Observe the resulting request at an authorized callback; repeat with shuffled negative controls to rule out prefetching, caching, and browser URL normalization.
  4. Test delivery boundaries. Establish who must view the page, whether the sink is stored or reflected, whether CSS is sanitized on each render, and whether the callback actually reveals information not already public. Check @import and font restrictions without assuming they are universally exploitable.
  5. Record coverage precisely. Sink, selector technique, browser, identity, canary ID, request artifact and callback artifact belong in the same coverage cell. Browser incompatibility or blocked callbacks is inconclusive/blocked, not tested_clean.

Evidence and dedup

  • Show source → CSS sink → victim/view boundary → observable security impact.
  • Include full relevant markup, computed style evidence and matched/unmatched controls.
  • Link to an HTML/XSS finding when both share one sink and one remediation; do not create two findings for the same root cause merely because CSS and JS impacts were both demonstrated.

N/A and gotchas

  • Static CSS editing in your own developer tools is not injection.
  • A callback generated unconditionally by the browser proves a request, not data leakage.
  • Attribute-selector techniques cannot read arbitrary text nodes or every kind of secret; state exactly what was inferred. DoS through pathological CSS is out of scope unless explicitly allowed.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.