Stored Cross-Site Scripting occurs due to insufficient input sanitization and output escaping. Unauthenticated attackers can inject arbitrary web scripts through the User-Agent header. These scripts execute when a user accesses an affected page. The current input filter uses a substring blacklist for bot signatures such as `bot`, `spider`, and `crawler`, which can be bypassed by crafting a payload that avoids these specific strings.