Stored Cross-Site Scripting occurs due to insufficient input sanitization and output escaping within the `embeddoc` shortcode. Authenticated attackers with contributor-level access or higher can inject arbitrary web scripts into pages, which then execute when a user visits the affected page.