Input Validation / CSS Injection (Stored)

Web and API

Description

CSS injection (stored) is a type of input validation vulnerability which occurs when a web application stores user-supplied data in a web page without properly validating or encoding it, which allows malicious users to inject arbitrary CSS code into the page. This type of vulnerability is classified in the Common Weakness Enumeration (CWE) directory as CWE-79, and is described in the OWASP Testing Guide as an input validation flaw which can be exploited to inject malicious HTML and JavaScript code into the page.

Risk

The risk associated with this vulnerability is that malicious users can inject arbitrary CSS code into a web page, which can be used to modify the style and layout of a web page, resulting in a wide range of attacks including defacement, phishing, and data exfiltration. The risk assessment of this vulnerability is critical, as it can result in a serious security breach.

Solution

The solution to this vulnerability is to ensure that user-supplied data is properly validated and encoded before being stored in a web page. Additionally, any user-supplied data should be encoded with HTML entities to prevent malicious code from being executed.

Curious? Convinced? Interested?

Arrange a no-obligation consultation with one of our product experts today.