CAPEC-592: Stored XSS
Description
An adversary utilizes a form of Cross-site Scripting (XSS) where a malicious script is persistently stored within the data storage of a vulnerable web application as valid input.
- Likelihood of attack
- High
- Typical severity
- Very High
- Abstraction
- DetailedA low-level, detailed pattern, often for a particular technology.
Mechanism of attack: Inject Unexpected Items
Prerequisites
- An application that leverages a client-side web browser with scripting enabled.
- An application that fails to adequately sanitize or encode untrusted input.
- An application that stores information provided by the user in data storage of some kind.
Skills required
- MediumRequires the ability to write scripts of varying complexity and to inject them through user controlled fields within the application.
Consequences
- Confidentiality
Read Data
A successful Stored XSS attack can enable an adversary to exfiltrate sensitive information from the application.
- ConfidentialityAuthorizationAccess Control
Gain Privileges
A successful Stored XSS attack can enable an adversary to elevate their privilege level and access functionality they should not otherwise be allowed to access.
- ConfidentialityIntegrityAvailability
Execute Unauthorized Commands
A successful Stored XSS attack can enable an adversary run arbitrary code of their choosing, thus enabling a complete compromise of the application.
- Integrity
Modify Data
A successful Stored XSS attack can allow an adversary to tamper with application data.
Mitigations
- Use browser technologies that do not allow client-side scripting.
- Utilize strict type, character, and encoding enforcement.
- Ensure that all user-supplied input is validated before being stored.
Related weaknesses (CWE)
Related attack patterns
Parent
More specific patterns
- CAPEC-18XSS Targeting Non-Script ElementsDetailed
- CAPEC-32XSS Through HTTP Query StringsDetailed
- CAPEC-86XSS Through HTTP HeadersDetailed
- CAPEC-198XSS Targeting Error PagesDetailed
- CAPEC-199XSS Using Alternate SyntaxDetailed
- CAPEC-209XSS Using MIME Type MismatchDetailed
- CAPEC-243XSS Targeting HTML AttributesDetailed
- CAPEC-244XSS Targeting URI PlaceholdersDetailed
- CAPEC-245XSS Using Doubled CharactersDetailed
- CAPEC-247XSS Using Invalid CharactersDetailed