Executive brief
Materialize CSS is a popular web framework used to build responsive user interfaces. The autocomplete component improperly escapes user input, allowing attackers to inject malicious JavaScript that executes in users' browsers when they interact with autocomplete fields. This could lead to session hijacking, credential theft, or defacement of the application interface.
Technical details
The vulnerability is a cross-site scripting (XSS) flaw in the autocomplete component caused by improper HTML escaping of user input. User-controlled data (such as <not-a-tag />) is parsed as HTML/JavaScript and inserted directly into the DOM without sanitization. The attack is network-accessible and requires user interaction (typing in or interacting with the autocomplete field), with no authentication required. An attacker can inject arbitrary JavaScript to steal cookies, session tokens, or perform actions on behalf of the user. All versions up to 1.0.0 are affected.
Affected products
- Dogfalo materialize-css all versions up to 1.0.0
Timeline
- 2022-05-03: disclosed
- 2022-05-01: advisory: NVD published