Cross-Site Scripting in Attributes |
Attack Pattern ID: 243 (Detailed Attack Pattern Completeness: Stub) | Typical Severity: Medium | Status: Draft |
Cross-Site Scripting in Attributes |
Attack Pattern ID: 243 (Detailed Attack Pattern Completeness: Stub) | Typical Severity: Medium | Status: Draft |
Summary
The attacker inserts commands to perform cross-site scripting (XSS) actions in HTML attributes. Many filters do not adequately sanitize attributes against the presence of potentially dangerous commands even if they adequately sanitize tags. For example, dangerous expressions could be inserted into a style attribute in an anchor tag, resulting in the execution of malicious code when the resulting page is rendered. If a victim is tricked into viewing the rendered page the attack proceeds like a normal XSS attack, possibly resulting in the loss of sensitive cookies or other malicious activities.
The target application must fail to adequately sanitize HTML attributes against the presence of dangerous commands.
The attacker must trick the victim into following a crafted link to a vulnerable server or view a web post where the dangerous commands are executed.
Design: Use libraries and templates that minimize unfiltered input.
Implementation: Normalize, filter and white list all input including that which is not expected to have any scripting content.
Implementation: The victim should configure the browser to minimize active content from untrusted sources.
Nature | Type | ID | Name | Description | View(s) this relationship pertains to |
---|---|---|---|---|---|
ChildOf | Attack Pattern | 18 | Embedding Scripts in Nonscript Elements | Mechanism of Attack (primary)1000 |
Security-Database help your corporation foresee and avoid any security risks that may impact your IT infrastructure and business applications.
28 June 2016