179
Example 1:
In the following example, a guestbook comment isn't properly encoded, filtered, or otherwise
neutralized for script-related tags before being displayed in a client browser.
Example Language: JSP (Bad)
<% for (Iterator i = guestbook.iterator(); i.hasNext(); ) {
Entry e = (Entry) i.next(); %>
<p>Entry #<%= e.getId() %></p>
<p><%= e.getText() %></p>
<%
} %>
Observed Examples
Reference Description
CVE-2002-0938 XSS in parameter in a link.
https://www.cve.org/CVERecord?id=CVE-2002-0938
CVE-2002-1495 XSS in web-based email product via attachment filenames.
https://www.cve.org/CVERecord?id=CVE-2002-1495
CVE-2003-1136 HTML injection in posted message.
https://www.cve.org/CVERecord?id=CVE-2003-1136
CVE-2004-2171 XSS not quoted in error page.
https://www.cve.org/CVERecord?id=CVE-2004-2171
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories and Views that reference this
weakness as a member. This information is often useful in understanding where a weakness fits
within the context of external information sources.
Nature Type ID Name Page
MemberOf 990 SFP Secondary Cluster: Tainted Input to Command 888 2413
MemberOf 1347 OWASP Top Ten 2021 Category A03:2021 - Injection 1344 2490
MemberOf 1409 Comprehensive Categorization: Injection 1400 2535
Taxonomy Mappings
Mapped Taxonomy Name Node ID Fit Mapped Node Name
PLOVER Basic XSS
Software Fault Patterns SFP24 Tainted input to command
Related Attack Patterns
CAPEC-ID Attack Pattern Name
18 XSS Targeting Non-Script Elements
32 XSS Through HTTP Query Strings
86 XSS Through HTTP Headers
193 PHP Remote File Inclusion
CWE-81: Improper Neutralization of Script in an Error Message Web Page
Weakness ID : 81
Structure : Simple
Abstraction : Variant
Description
CWE Version 4.14
CWE-81: Improper Neutralization of Script in an Error Message Web Page
CWE-81: Improper Neutralization of Script in an Error Message Web Page