Stored Cross-Site Scripting occurs due to insufficient input sanitization and output escaping. Authenticated attackers with Contributor-level access or higher can inject arbitrary web scripts into pages via the `rootAttributes` parameter. These scripts execute automatically whenever a user visits the affected page.