Description
The product does not neutralize or incorrectly neutralizes web scripting syntax in HTTP headers that can be used by web browser components that can process raw headers, such as Flash.
An attacker may be able to conduct cross-site scripting and other attacks against users who have these components enabled. If a product does not neutralize user controlled data being placed in the header of an HTTP response coming from the server, the header may contain a script that will get executed in the client's browser context, potentially resulting in a cross site scripting vulnerability or possibly an HTTP response splitting attack. It is important to carefully control data that is being placed both in HTTP response header and in the HTTP response body to ensure that no scripting syntax is present, taking various encodings into account.
Potential Impact
Integrity, Confidentiality, Availability
Execute Unauthorized Code or Commands
Confidentiality
Read Application Data
Demonstrative Examples
response.addHeader(HEADER_NAME, untrustedRawInputData);Mitigations & Prevention
Perform output validation in order to filter/escape/encode unsafe data that is being passed from the server in an HTTP response header.
Disable script execution functionality in the clients' browser.
Real-World CVE Examples
| CVE ID | Description |
|---|---|
| CVE-2006-3918 | Web server does not remove the Expect header from an HTTP request when it is reflected back in an error message, allowing a Flash SWF file to perform XSS attacks. |
Related Weaknesses
Taxonomy Mappings
- Software Fault Patterns: SFP24 — Tainted input to command
Frequently Asked Questions
What is CWE-644?
CWE-644 (Improper Neutralization of HTTP Headers for Scripting Syntax) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Variant-level weakness. The product does not neutralize or incorrectly neutralizes web scripting syntax in HTTP headers that can be used by web browser components that can process raw headers, such as Flash.
How can CWE-644 be exploited?
Attackers can exploit CWE-644 (Improper Neutralization of HTTP Headers for Scripting Syntax) to execute unauthorized code or commands. This weakness is typically introduced during the Implementation phase of software development.
How do I prevent CWE-644?
Key mitigations include: Perform output validation in order to filter/escape/encode unsafe data that is being passed from the server in an HTTP response header.
What is the severity of CWE-644?
CWE-644 is classified as a Variant-level weakness (Low-Medium abstraction). It has been observed in 1 real-world CVEs.