CWE•Variant•Draft•1 recent CVE
CWE-84Improper Neutralization of Encoded URI Schemes in a Web Page
Description
The web application improperly neutralizes user-controlled input for executable script disguised with URI encodings.
Common consequences
- Integrity→Unexpected State
Potential mitigations
- ImplementationResolve all URIs to absolute or canonical representations before processing.
- ImplementationCarefully 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 v
- Implementation[object Object]
- ImplementationWith Struts, write all data from form beans with the bean's filter attribute set to true.
- ImplementationTo 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 n