[Forgot Password]
Login  Register Subscribe

30479

 
 

423868

 
 

248268

 
 

909

 
 

195051

 
 

282

Paid content will be excluded from the download.


Download | Alert*
CWE
view XML

Improper Neutralization of HTTP Headers for Scripting Syntax

ID: 644Date: (C)2012-05-14   (M)2022-10-10
Type: weaknessStatus: INCOMPLETE
Abstraction Type: Variant





Description

The application 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.

Extended Description

An attacker may be able to conduct cross-site scripting and other attacks against users who have these components enabled.

If an application 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.

Enabling Factors for Exploitation
Script execution functionality is enabled in the user's browser.

Likelihood of Exploit: High

Applicable Platforms
Language Class: All

Time Of Introduction

  • Architecture and Design
  • Implementation

Common Consequences

ScopeTechnical ImpactNotes
Integrity
Confidentiality
Availability
 
Execute unauthorized code or commands
 
Run arbitrary code.
 
Confidentiality
 
Read application data
 
Attackers may be able to obtain sensitive information.
 

Detection Methods
None

Potential Mitigations

PhaseStrategyDescriptionEffectivenessNotes
Architecture and Design
 
 Perform output validation in order to filter/escape/encode unsafe data that is being passed from the server in an HTTP response header.
 
  
Architecture and Design
 
 Disable script execution functionality in the clients' browser.
 
  

Relationships

Related CWETypeViewChain
CWE-644 ChildOf CWE-896 Category CWE-888  

Demonstrative Examples   (Details)

  1. In the following Java example, user-controlled data is added to the HTTP headers and returned to the client. Given that the data is not subject to neutralization, a malicious user may be able to inject dangerous scripting tags that will lead to script execution in the client browser.

Observed Examples

  1. 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.

For more examples, refer to CVE relations in the bottom box.

White Box Definitions
None

Black Box Definitions
None

Taxynomy Mappings
None

References:
None

CVE    1
CVE-2021-21265

© SecPod Technologies