- What is CAPEC-18?
- This attack is a form of Cross-Site Scripting (XSS) where malicious scripts are embedded in elements that are not expected to host scripts such as image tags ( ), comments in XML documents ( ), etc. These tags may not be subject to the same input validation, output validation, and other content filtering and checking routines, so this can create an opportunity for an adversary to tunnel through the application's elements and launch a XSS attack through other elements. As with all remote attacks, it is important to differentiate the ability to launch an attack (such as probing an internal network for unpatched servers) and the ability of the remote adversary to collect and interpret the output of said attack.
- How does a XSS Targeting Non-Script Elements attack work?
- It typically unfolds over 4 phases. It begins with: [Survey the application for user-controllable inputs] Using a browser or an automated tool, an adversary records all entry points for inputs that happen to be reflected in a client-side non-script element. These non-script elements can be located in the HTML content (head, body, comments), in an HTML tag, XML, CSS, etc.
- How do you prevent CAPEC-18?
- In addition to the traditional input fields, all other user controllable inputs, such as image tags within messages or the likes, must also be subjected to input validation. Such validation should ensure that content that can be potentially interpreted as script by the browser is appropriately filtered.
- What weaknesses does CAPEC-18 target?
- CAPEC-18 exploits 1 CWE weakness, including CWE-80 (Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)).
- How severe is CAPEC-18?
- MITRE rates CAPEC-18 as Very High severity with high likelihood of attack.