Cyber Risks · PortSwigger Research

CSS injection (stored)

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, and the stored variant occurs when that input was submitted in a previous request and saved by the application. PortSwigger describes these as closely related to cross-site scripting but often trickier to exploit, and rates the issue medium severity.

Key Takeaway: The recommended fix is escaping user input before it goes into CSS blocks and considering a whitelist to block arbitrary style sheets - a control that only works if every place the application stores and later renders user input is covered.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related