Description
The web application improperly neutralizes user-controlled input for executable script disguised with URI encodings.
Potential Impact
Integrity
Unexpected State
Mitigations & Prevention
Resolve all URIs to absolute or canonical representations before processing.
Carefully check each input parameter against a rigorous positive specification (allowlist) defining the specific characters and format allowed. All input should be neutralized, not just parameters that the user is supposed to specify, but all data in the request, including tag attributes, hidden fields, cookies, headers, the URL itself, and so forth. A common mistake that leads to continuing XSS vulnerabilities is to validate only fields that are expected to be redisplayed by the site. We often
Use and specify an output encoding that can be handled by the downstream component that is reading the output. Common encodings include ISO-8859-1, UTF-7, and UTF-8. When an encoding is not specified, a downstream component may choose a different encoding, either by assuming a default encoding or automatically inferring which encoding is being used, which can be erroneous. When the encodings are inconsistent, the downstream component might treat some character or byte sequences as special, even
With Struts, write all data from form beans with the bean's filter attribute set to true.
To help mitigate XSS attacks against the user's session cookie, set the session cookie to be HttpOnly. In browsers that support the HttpOnly feature (such as more recent versions of Internet Explorer and Firefox), this attribute can prevent the user's session cookie from being accessible to malicious client-side scripts that use document.cookie. This is not a complete solution, since HttpOnly is not supported by all browsers. More importantly, XmlHttpRequest and other powerful browser technologi
Real-World CVE Examples
| CVE ID | Description |
|---|---|
| CVE-2005-0563 | Cross-site scripting (XSS) vulnerability in Microsoft Outlook Web Access (OWA) component in Exchange Server 5.5 allows remote attackers to inject arbitrary web script or HTML via an email message with |
| CVE-2005-2276 | Cross-site scripting (XSS) vulnerability in Novell Groupwise WebAccess 6.5 before July 11, 2005 allows remote attackers to inject arbitrary web script or HTML via an e-mail message with an encoded jav |
| CVE-2005-0692 | Encoded script within BBcode IMG tag. |
| CVE-2002-0117 | Encoded "javascript" in IMG tag. |
| CVE-2002-0118 | Encoded "javascript" in IMG tag. |
Related Weaknesses
Taxonomy Mappings
- PLOVER: — XSS using Script Via Encoded URI Schemes
- Software Fault Patterns: SFP24 — Tainted input to command
Frequently Asked Questions
What is CWE-84?
CWE-84 (Improper Neutralization of Encoded URI Schemes in a Web Page) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Variant-level weakness. The web application improperly neutralizes user-controlled input for executable script disguised with URI encodings.
How can CWE-84 be exploited?
Attackers can exploit CWE-84 (Improper Neutralization of Encoded URI Schemes in a Web Page) to unexpected state. This weakness is typically introduced during the Implementation phase of software development.
How do I prevent CWE-84?
Key mitigations include: Resolve all URIs to absolute or canonical representations before processing.
What is the severity of CWE-84?
CWE-84 is classified as a Variant-level weakness (Low-Medium abstraction). It has been observed in 5 real-world CVEs.