Advisor
Wiki Threats & Attacks Application Attacks Stored XSS

Stored XSS

1 min read
Jump to:

Summary

Stored Cross-Site Scripting (Stored XSS) is a web application vulnerability where malicious scripts are permanently injected into a target website’s database, message forum, or other data storage. When users access the affected content, the malicious code executes in their browsers, potentially leading to session hijacking, data theft, or other malicious activities.

Key Characteristics

  • Malicious script is permanently stored on the target server.
  • Executed every time a user accesses the infected content.
  • Commonly found in forums, comment sections, user profiles, and other input fields.
  • Exploits insufficient input validation and output encoding.
  • Can lead to theft of cookies, credentials, and sensitive user data.

Defensive Controls

  • Implement rigorous input validation and sanitization on all user inputs.
  • Use proper output encoding to neutralize scripts before rendering.
  • Employ Content Security Policy (CSP) headers to restrict script execution.
  • Regularly update and patch web applications and frameworks.
  • Conduct security testing such as penetration tests and code reviews.

Related Security Solutions

Web Application Firewalls (WAFs) can help detect and block malicious payloads associated with Stored XSS. Secure coding frameworks and libraries provide built-in protections against script injection. Security scanners and vulnerability assessment tools assist in identifying Stored XSS vulnerabilities during development and deployment phases.

Tags: Application Attacks content security policy cross-site scripting Input Validation Output Encoding Stored XSS Threats & Attacks web application firewall web application security