CWE-644: Improper Neutralization of HTTP Headers for Scripting Syntax

VariantIncompleteExploit Likelihood: High

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.

View on MITRE
Back to CWE Lookup

Extended Description

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.

Technical Details

Structure
Simple

Applicable To

Languages
Not Language-Specific
Platforms

Frequently Asked Questions

What is CWE-644: Improper Neutralization of HTTP Headers for Scripting Syntax?+

CWE-644: Improper Neutralization of HTTP Headers for Scripting Syntax is a Common Weakness Enumeration (CWE) entry maintained by MITRE. 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.

What are the security consequences of Improper Neutralization of HTTP Headers for Scripting Syntax?+

If exploited, CWE-644 (Improper Neutralization of HTTP Headers for Scripting Syntax) it can compromise Integrity, Confidentiality and Availability, leading to outcomes such as Execute Unauthorized Code or Commands and Read Application Data.

How do you prevent or mitigate Improper Neutralization of HTTP Headers for Scripting Syntax?+

Recommended mitigations for CWE-644 include: 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.

Which programming languages are affected by Improper Neutralization of HTTP Headers for Scripting Syntax?+

CWE-644 commonly affects Not Language-Specific. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.

What are real-world examples of Improper Neutralization of HTTP Headers for Scripting Syntax?+

MITRE documents real CVEs mapped to CWE-644, including CVE-2006-3918. You can look up the full details of each CVE, including CVSS scores and remediation guidance, on our CVE Lookup tool.

What is the difference between a CWE and a CVE?+

A CWE (Common Weakness Enumeration) like CWE-644 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.

Learn More